blob: 178cf1f0f70554adcd8a39612b11fa49ef734b53 [file] [log] [blame]
Archana Sathyakumar49dfa822017-05-10 11:07:37 -06001/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 *
12 */
13
14#include <linux/irqchip.h>
15#include "pdc.h"
16
17static struct pdc_pin sdm845_data[] = {
18 {0, 512}, /* rpmh_wake */
19 {1, 513}, /* ee0_apps_hlos_spmi_periph_irq */
20 {2, 514}, /* ee1_apps_trustzone_spmi_periph_irq */
21 {3, 515}, /* secure_wdog_expired */
22 {4, 516}, /* secure_wdog_bark_irq */
23 {5, 517}, /* aop_wdog_expired_irq */
24 {6, 518}, /* qmp_usb3_lfps_rxterm_irq */
25 {7, 519}, /* qmp_usb3_lfps_rxterm_irq */
26 {8, 520}, /* eud_p0_dmse_int_mx */
27 {9, 521}, /* eud_p0_dpse_int_mx */
28 {10, 522}, /* eud_p1_dmse_int_mx */
29 {11, 523}, /* eud_p1_dpse_int_mx */
30 {12, 524}, /* eud_int_mx[1] */
31 {13, 525}, /* ssc_xpu_irq_summary */
32 {14, 526}, /* wd_bite_apps */
33 {15, 527}, /* ssc_vmidmt_irq_summary */
34 {16, 528}, /* q6ss_irq_out_apps_ipc[4] */
35 {17, 529}, /* not-connected */
36 {18, 530}, /* aoss_pmic_arb_mpu_xpu_summary_irq */
37 {19, 531}, /* apps_pdc_irq_in_19 */
38 {20, 532}, /* apps_pdc_irq_in_20 */
39 {21, 533}, /* apps_pdc_irq_in_21 */
40 {22, 534}, /* pdc_apps_epcb_timeout_summary_irq */
41 {23, 535}, /* spmi_protocol_irq */
42 {24, 536}, /* tsense0_tsense_max_min_int */
43 {25, 537}, /* tsense1_tsense_max_min_int */
44 {26, 538}, /* tsense0_upper_lower_intr */
45 {27, 539}, /* tsense1_upper_lower_intr */
46 {28, 540}, /* tsense0_critical_intr */
47 {29, 541}, /* tsense1_critical_intr */
48 {30, 542}, /* core_bi_px_gpio_1 */
49 {31, 543}, /* core_bi_px_gpio_3 */
50 {32, 544}, /* core_bi_px_gpio_5 */
51 {33, 545}, /* core_bi_px_gpio_10 */
52 {34, 546}, /* core_bi_px_gpio_11 */
53 {35, 547}, /* core_bi_px_gpio_20 */
54 {36, 548}, /* core_bi_px_gpio_22 */
55 {37, 549}, /* core_bi_px_gpio_24 */
56 {38, 550}, /* core_bi_px_gpio_26 */
57 {39, 551}, /* core_bi_px_gpio_30 */
58 {41, 553}, /* core_bi_px_gpio_32 */
59 {42, 554}, /* core_bi_px_gpio_34 */
60 {43, 555}, /* core_bi_px_gpio_36 */
61 {44, 556}, /* core_bi_px_gpio_37 */
62 {45, 557}, /* core_bi_px_gpio_38 */
63 {46, 558}, /* core_bi_px_gpio_39 */
64 {47, 559}, /* core_bi_px_gpio_40 */
65 {49, 561}, /* core_bi_px_gpio_43 */
66 {50, 562}, /* core_bi_px_gpio_44 */
67 {51, 563}, /* core_bi_px_gpio_46 */
68 {52, 564}, /* core_bi_px_gpio_48 */
69 {54, 566}, /* core_bi_px_gpio_52 */
70 {55, 567}, /* core_bi_px_gpio_53 */
71 {56, 568}, /* core_bi_px_gpio_54 */
72 {57, 569}, /* core_bi_px_gpio_56 */
73 {58, 570}, /* core_bi_px_gpio_57 */
74 {59, 571}, /* core_bi_px_gpio_58 */
75 {60, 572}, /* core_bi_px_gpio_59 */
76 {61, 573}, /* core_bi_px_gpio_60 */
77 {62, 574}, /* core_bi_px_gpio_61 */
78 {63, 575}, /* core_bi_px_gpio_62 */
79 {64, 576}, /* core_bi_px_gpio_63 */
80 {65, 577}, /* core_bi_px_gpio_64 */
81 {66, 578}, /* core_bi_px_gpio_66 */
82 {67, 579}, /* core_bi_px_gpio_68 */
83 {68, 580}, /* core_bi_px_gpio_71 */
84 {69, 581}, /* core_bi_px_gpio_73 */
85 {70, 582}, /* core_bi_px_gpio_77 */
86 {71, 583}, /* core_bi_px_gpio_78 */
87 {72, 584}, /* core_bi_px_gpio_79 */
88 {73, 585}, /* core_bi_px_gpio_80 */
89 {74, 586}, /* core_bi_px_gpio_84 */
90 {75, 587}, /* core_bi_px_gpio_85 */
91 {76, 588}, /* core_bi_px_gpio_86 */
92 {77, 589}, /* core_bi_px_gpio_88 */
93 {79, 591}, /* core_bi_px_gpio_91 */
94 {80, 592}, /* core_bi_px_gpio_92 */
95 {81, 593}, /* core_bi_px_gpio_95 */
96 {82, 594}, /* core_bi_px_gpio_96 */
97 {83, 595}, /* core_bi_px_gpio_97 */
98 {84, 596}, /* core_bi_px_gpio_101 */
99 {85, 597}, /* core_bi_px_gpio_103 */
100 {86, 598}, /* core_bi_px_gpio_104 */
101 {87, 599}, /* core_bi_px_to_mpm[6] */
102 {88, 600}, /* core_bi_px_to_mpm[0] */
103 {89, 601}, /* core_bi_px_to_mpm[1] */
104 {90, 602}, /* core_bi_px_gpio_115 */
105 {91, 603}, /* core_bi_px_gpio_116 */
106 {92, 604}, /* core_bi_px_gpio_117 */
107 {93, 605}, /* core_bi_px_gpio_118 */
108 {94, 641}, /* core_bi_px_gpio_119 */
109 {95, 642}, /* core_bi_px_gpio_120 */
110 {96, 643}, /* core_bi_px_gpio_121 */
111 {97, 644}, /* core_bi_px_gpio_122 */
112 {98, 645}, /* core_bi_px_gpio_123 */
113 {99, 646}, /* core_bi_px_gpio_124 */
114 {100, 647}, /* core_bi_px_gpio_125 */
115 {101, 648}, /* core_bi_px_to_mpm[5] */
116 {102, 649}, /* core_bi_px_gpio_127 */
117 {103, 650}, /* core_bi_px_gpio_128 */
118 {104, 651}, /* core_bi_px_gpio_129 */
119 {105, 652}, /* core_bi_px_gpio_130 */
120 {106, 653}, /* core_bi_px_gpio_132 */
121 {107, 654}, /* core_bi_px_gpio_133 */
122 {108, 655}, /* core_bi_px_gpio_145 */
123 {119, 666}, /* core_bi_px_to_mpm[2] */
124 {120, 667}, /* core_bi_px_to_mpm[3] */
125 {121, 668}, /* core_bi_px_to_mpm[4] */
126 {122, 669}, /* core_bi_px_gpio_41 */
127 {123, 670}, /* core_bi_px_gpio_89 */
128 {124, 671}, /* core_bi_px_gpio_31 */
129 {125, 672}, /* core_bi_px_gpio_49 */
130 {-1}
131};
132
133static int __init qcom_pdc_gic_init(struct device_node *node,
134 struct device_node *parent)
135{
136 return qcom_pdc_init(node, parent, sdm845_data);
137}
138
139IRQCHIP_DECLARE(pdc_sdm845, "qcom,pdc-sdm845", qcom_pdc_gic_init);