@@ -40,6 +40,14 @@ struct mtk_eint_hw {
const unsigned int *db_time;
};
+struct mtk_eint_pin {
+ u16 number;
+ u8 instance;
+ u8 index;
+ bool debounce;
+ bool dual_edge;
+};
+
extern const unsigned int debounce_time_mt2701[];
extern const unsigned int debounce_time_mt6765[];
extern const unsigned int debounce_time_mt6795[];
@@ -67,6 +75,7 @@ struct mtk_eint {
/* Used to fit into various EINT device */
const struct mtk_eint_hw *hw;
const struct mtk_eint_regs *regs;
+ struct mtk_eint_pin *pins;
u16 num_db_time;
/* Used to fit into various pinctrl device */
@@ -1728,6 +1728,7 @@ static const struct mtk_pin_soc mt8196_data = {
.npins = ARRAY_SIZE(mtk_pins_mt8196),
.ngrps = ARRAY_SIZE(mtk_pins_mt8196),
.eint_hw = &mt8196_eint_hw,
+ .eint_pin = eint_pins_mt8196,
.nfuncs = 8,
.gpio_m = 0,
.base_names = mt8196_pinctrl_register_base_names,
@@ -242,6 +242,7 @@ struct mtk_pin_soc {
unsigned int nfuncs;
const struct mtk_eint_regs *eint_regs;
const struct mtk_eint_hw *eint_hw;
+ struct mtk_eint_pin *eint_pin;
/* Specific parameters per SoC */
u8 gpio_m;
@@ -2786,4 +2786,236 @@ static const struct mtk_pin_desc mtk_pins_mt8196[] = {
)
};
+static struct mtk_eint_pin eint_pins_mt8196[] = {
+ MTK_EINT_PIN(0, 2, 0, 1),
+ MTK_EINT_PIN(1, 2, 1, 1),
+ MTK_EINT_PIN(2, 2, 16, 0),
+ MTK_EINT_PIN(3, 2, 17, 0),
+ MTK_EINT_PIN(4, 2, 2, 1),
+ MTK_EINT_PIN(5, 2, 3, 1),
+ MTK_EINT_PIN(6, 2, 4, 1),
+ MTK_EINT_PIN(7, 2, 5, 1),
+ MTK_EINT_PIN(8, 2, 6, 1),
+ MTK_EINT_PIN(9, 2, 18, 0),
+ MTK_EINT_PIN(10, 2, 7, 1),
+ MTK_EINT_PIN(11, 2, 8, 1),
+ MTK_EINT_PIN(12, 2, 9, 1),
+ MTK_EINT_PIN(13, 1, 4, 0),
+ MTK_EINT_PIN(14, 0, 0, 1),
+ MTK_EINT_PIN(15, 1, 5, 0),
+ MTK_EINT_PIN(16, 1, 6, 0),
+ MTK_EINT_PIN(17, 1, 7, 0),
+ MTK_EINT_PIN(18, 1, 8, 0),
+ MTK_EINT_PIN(19, 1, 9, 0),
+ MTK_EINT_PIN(20, 0, 1, 1),
+ MTK_EINT_PIN(21, 0, 10, 0),
+ MTK_EINT_PIN(22, 0, 11, 0),
+ MTK_EINT_PIN(23, 0, 12, 0),
+ MTK_EINT_PIN(24, 0, 13, 0),
+ MTK_EINT_PIN(25, 0, 14, 0),
+ MTK_EINT_PIN(26, 0, 15, 0),
+ MTK_EINT_PIN(27, 0, 2, 1),
+ MTK_EINT_PIN(28, 0, 16, 0),
+ MTK_EINT_PIN(29, 0, 17, 0),
+ MTK_EINT_PIN(30, 0, 18, 0),
+ MTK_EINT_PIN(31, 0, 3, 1),
+ MTK_EINT_PIN(32, 0, 19, 0),
+ MTK_EINT_PIN(33, 0, 20, 0),
+ MTK_EINT_PIN(34, 0, 21, 0),
+ MTK_EINT_PIN(35, 0, 22, 0),
+ MTK_EINT_PIN(36, 0, 23, 0),
+ MTK_EINT_PIN(37, 0, 24, 0),
+ MTK_EINT_PIN(38, 0, 25, 0),
+ MTK_EINT_PIN(39, 2, 10, 1),
+ MTK_EINT_PIN(40, 2, 11, 1),
+ MTK_EINT_PIN(41, 2, 12, 1),
+ MTK_EINT_PIN(42, 2, 13, 1),
+ MTK_EINT_PIN(43, 2, 14, 1),
+ MTK_EINT_PIN(44, 2, 19, 0),
+ MTK_EINT_PIN(45, 2, 20, 0),
+ MTK_EINT_PIN(46, 2, 21, 0),
+ MTK_EINT_PIN(47, 2, 22, 0),
+ MTK_EINT_PIN(48, 2, 23, 0),
+ MTK_EINT_PIN(49, 2, 24, 0),
+ MTK_EINT_PIN(50, 2, 25, 0),
+ MTK_EINT_PIN(51, 2, 26, 0),
+ MTK_EINT_PIN(60, 2, 27, 0),
+ MTK_EINT_PIN(61, 2, 28, 0),
+ MTK_EINT_PIN(62, 2, 29, 0),
+ MTK_EINT_PIN(63, 2, 30, 0),
+ MTK_EINT_PIN(64, 2, 31, 0),
+ MTK_EINT_PIN(65, 2, 32, 0),
+ MTK_EINT_PIN(70, 2, 33, 0),
+ MTK_EINT_PIN(71, 2, 34, 0),
+ MTK_EINT_PIN(72, 2, 35, 0),
+ MTK_EINT_PIN(73, 2, 36, 0),
+ MTK_EINT_PIN(74, 2, 37, 0),
+ MTK_EINT_PIN(79, 2, 38, 0),
+ MTK_EINT_PIN(80, 2, 39, 0),
+ MTK_EINT_PIN(81, 2, 40, 0),
+ MTK_EINT_PIN(82, 2, 41, 0),
+ MTK_EINT_PIN(83, 2, 42, 0),
+ MTK_EINT_PIN(84, 2, 43, 0),
+ MTK_EINT_PIN(85, 2, 44, 0),
+ MTK_EINT_PIN(86, 2, 45, 0),
+ MTK_EINT_PIN(87, 2, 46, 0),
+ MTK_EINT_PIN(88, 2, 47, 0),
+ MTK_EINT_PIN(89, 2, 48, 0),
+ MTK_EINT_PIN(90, 2, 49, 0),
+ MTK_EINT_PIN(91, 2, 50, 0),
+ MTK_EINT_PIN(92, 2, 15, 1),
+ MTK_EINT_PIN(93, 2, 51, 0),
+ MTK_EINT_PIN(94, 2, 52, 0),
+ MTK_EINT_PIN(95, 2, 53, 0),
+ MTK_EINT_PIN(96, 2, 54, 0),
+ MTK_EINT_PIN(97, 2, 55, 0),
+ MTK_EINT_PIN(98, 2, 56, 0),
+ MTK_EINT_PIN(103, 2, 57, 0),
+ MTK_EINT_PIN(106, 1, 10, 0),
+ MTK_EINT_PIN(107, 1, 11, 0),
+ MTK_EINT_PIN(108, 1, 12, 0),
+ MTK_EINT_PIN(109, 1, 13, 0),
+ MTK_EINT_PIN(110, 1, 0, 1),
+ MTK_EINT_PIN(111, 1, 1, 1),
+ MTK_EINT_PIN(112, 1, 2, 1),
+ MTK_EINT_PIN(113, 1, 3, 1),
+ MTK_EINT_PIN(114, 1, 14, 0),
+ MTK_EINT_PIN(115, 1, 15, 0),
+ MTK_EINT_PIN(116, 1, 16, 0),
+ MTK_EINT_PIN(117, 1, 17, 0),
+ MTK_EINT_PIN(118, 1, 18, 0),
+ MTK_EINT_PIN(119, 1, 19, 0),
+ MTK_EINT_PIN(120, 1, 20, 0),
+ MTK_EINT_PIN(121, 1, 21, 0),
+ MTK_EINT_PIN(122, 1, 22, 0),
+ MTK_EINT_PIN(125, 1, 23, 0),
+ MTK_EINT_PIN(126, 1, 24, 0),
+ MTK_EINT_PIN(127, 1, 25, 0),
+ MTK_EINT_PIN(128, 1, 26, 0),
+ MTK_EINT_PIN(129, 1, 27, 0),
+ MTK_EINT_PIN(130, 1, 28, 0),
+ MTK_EINT_PIN(137, 0, 26, 0),
+ MTK_EINT_PIN(138, 0, 27, 0),
+ MTK_EINT_PIN(139, 0, 28, 0),
+ MTK_EINT_PIN(140, 0, 29, 0),
+ MTK_EINT_PIN(141, 0, 30, 0),
+ MTK_EINT_PIN(142, 0, 31, 0),
+ MTK_EINT_PIN(143, 0, 32, 0),
+ MTK_EINT_PIN(144, 0, 33, 0),
+ MTK_EINT_PIN(145, 0, 34, 0),
+ MTK_EINT_PIN(146, 0, 35, 0),
+ MTK_EINT_PIN(147, 0, 36, 0),
+ MTK_EINT_PIN(148, 0, 4, 1),
+ MTK_EINT_PIN(149, 0, 37, 0),
+ MTK_EINT_PIN(150, 0, 5, 1),
+ MTK_EINT_PIN(151, 0, 38, 0),
+ MTK_EINT_PIN(152, 0, 39, 0),
+ MTK_EINT_PIN(153, 0, 40, 0),
+ MTK_EINT_PIN(154, 0, 41, 0),
+ MTK_EINT_PIN(155, 0, 42, 0),
+ MTK_EINT_PIN(156, 0, 43, 0),
+ MTK_EINT_PIN(157, 0, 44, 0),
+ MTK_EINT_PIN(158, 0, 45, 0),
+ MTK_EINT_PIN(159, 0, 46, 0),
+ MTK_EINT_PIN(160, 0, 47, 0),
+ MTK_EINT_PIN(161, 0, 48, 0),
+ MTK_EINT_PIN(162, 0, 49, 0),
+ MTK_EINT_PIN(163, 0, 50, 0),
+ MTK_EINT_PIN(164, 0, 51, 0),
+ MTK_EINT_PIN(165, 0, 52, 0),
+ MTK_EINT_PIN(166, 0, 53, 0),
+ MTK_EINT_PIN(167, 0, 54, 0),
+ MTK_EINT_PIN(168, 0, 55, 0),
+ MTK_EINT_PIN(169, 0, 56, 0),
+ MTK_EINT_PIN(170, 0, 57, 0),
+ MTK_EINT_PIN(171, 0, 58, 0),
+ MTK_EINT_PIN(172, 0, 6, 1),
+ MTK_EINT_PIN(173, 0, 7, 1),
+ MTK_EINT_PIN(174, 0, 8, 1),
+ MTK_EINT_PIN(175, 0, 9, 1),
+ MTK_EINT_PIN(178, 0, 59, 0),
+ MTK_EINT_PIN(179, 0, 60, 0),
+ MTK_EINT_PIN(180, 0, 61, 0),
+ MTK_EINT_PIN(181, 0, 62, 0),
+ MTK_EINT_PIN(182, 0, 63, 0),
+ MTK_EINT_PIN(183, 0, 64, 0),
+ MTK_EINT_PIN(184, 0, 65, 0),
+ MTK_EINT_PIN(185, 0, 66, 0),
+ MTK_EINT_PIN(186, 3, 6, 0),
+ MTK_EINT_PIN(187, 3, 7, 0),
+ MTK_EINT_PIN(192, 3, 8, 0),
+ MTK_EINT_PIN(193, 3, 9, 0),
+ MTK_EINT_PIN(196, 3, 10, 0),
+ MTK_EINT_PIN(197, 3, 11, 0),
+ MTK_EINT_PIN(204, 3, 12, 0),
+ MTK_EINT_PIN(205, 3, 13, 0),
+ MTK_EINT_PIN(206, 3, 14, 0),
+ MTK_EINT_PIN(207, 3, 0, 1),
+ MTK_EINT_PIN(208, 3, 1, 1),
+ MTK_EINT_PIN(209, 3, 2, 1),
+ MTK_EINT_PIN(210, 3, 15, 0),
+ MTK_EINT_PIN(211, 3, 3, 1),
+ MTK_EINT_PIN(212, 3, 4, 1),
+ MTK_EINT_PIN(213, 3, 5, 1),
+ MTK_EINT_PIN(216, 3, 16, 0),
+ MTK_EINT_PIN(217, 3, 17, 0),
+ MTK_EINT_PIN(218, 3, 18, 0),
+ MTK_EINT_PIN(219, 3, 19, 0),
+ MTK_EINT_PIN(220, 3, 20, 0),
+ MTK_EINT_PIN(221, 3, 21, 0),
+ MTK_EINT_PIN(222, 3, 22, 0),
+ MTK_EINT_PIN(223, 3, 23, 0),
+ MTK_EINT_PIN(224, 3, 24, 0),
+ MTK_EINT_PIN(225, 3, 25, 0),
+ MTK_EINT_PIN(226, 3, 26, 0),
+ MTK_EINT_PIN(227, 3, 27, 0),
+ MTK_EINT_PIN(228, 3, 28, 0),
+ MTK_EINT_PIN(229, 3, 29, 0),
+ MTK_EINT_PIN(241, 3, 30, 0),
+ MTK_EINT_PIN(242, 3, 31, 0),
+ MTK_EINT_PIN(243, 3, 32, 0),
+ MTK_EINT_PIN(245, 3, 45, 0),
+ MTK_EINT_PIN(251, 0, 67, 0),
+ MTK_EINT_PIN(252, 0, 68, 0),
+ MTK_EINT_PIN(253, 0, 69, 0),
+ MTK_EINT_PIN(254, 0, 70, 0),
+ MTK_EINT_PIN(255, 0, 71, 0),
+ MTK_EINT_PIN(256, 0, 72, 0),
+ MTK_EINT_PIN(257, 0, 73, 0),
+ MTK_EINT_PIN(258, 0, 74, 0),
+ MTK_EINT_PIN(259, 3, 33, 0),
+ MTK_EINT_PIN(260, 3, 34, 0),
+ MTK_EINT_PIN(261, 3, 35, 0),
+ MTK_EINT_PIN(262, 3, 36, 0),
+ MTK_EINT_PIN(263, 3, 37, 0),
+ MTK_EINT_PIN(264, 3, 38, 0),
+ MTK_EINT_PIN(265, 3, 39, 0),
+ MTK_EINT_PIN(266, 3, 40, 0),
+ MTK_EINT_PIN(267, 3, 41, 0),
+ MTK_EINT_PIN(268, 3, 42, 0),
+ MTK_EINT_PIN(269, 3, 43, 0),
+ MTK_EINT_PIN(270, 3, 44, 0),
+ MTK_EINT_PIN(271, 4, 0, 0),
+ MTK_EINT_PIN(272, 4, 1, 0),
+ MTK_EINT_PIN(273, 4, 2, 0),
+ MTK_EINT_PIN(274, 4, 3, 0),
+ MTK_EINT_PIN(275, 4, 4, 0),
+ MTK_EINT_PIN(276, 4, 5, 0),
+ MTK_EINT_PIN(277, 4, 6, 0),
+ MTK_EINT_PIN(278, 4, 7, 0),
+ MTK_EINT_PIN(279, 4, 8, 0),
+ MTK_EINT_PIN(280, 4, 9, 0),
+ MTK_EINT_PIN(281, 4, 10, 0),
+ MTK_EINT_PIN(282, 4, 11, 0),
+ MTK_EINT_PIN(283, 4, 12, 0),
+ MTK_EINT_PIN(284, 4, 13, 0),
+ MTK_EINT_PIN(285, 4, 14, 0),
+ MTK_EINT_PIN(286, 4, 15, 0),
+ MTK_EINT_PIN(287, 4, 16, 0),
+ MTK_EINT_PIN(288, 4, 17, 0),
+ MTK_EINT_PIN(289, 4, 18, 0),
+ MTK_EINT_PIN(290, 4, 19, 0),
+ MTK_EINT_PIN(291, 4, 20, 0),
+ MTK_EINT_PIN(292, 4, 21, 0),
+};
#endif /* __PINCTRL_MTK_MT8196_H */
@@ -49,6 +49,13 @@
__VA_ARGS__, { } }, \
}
+#define MTK_EINT_PIN(_number, _instance, _index, _debounce) { \
+ .number = _number, \
+ .instance = _instance, \
+ .index = _index, \
+ .debounce = _debounce, \
+ }
+
#define PINCTRL_PIN_GROUP(_name_, id) \
{ \
.grp = PINCTRL_PINGROUP(_name_,id##_pins, ARRAY_SIZE(id##_pins)), \