Skip to content

Commit 04133bb

Browse files
Alexandre TorgueMarc Zyngier
authored andcommitted
irqchip/stm32-exti: Add STM32MP13 support
Enhance stm32-exti driver to support STM32MP13 SoC. This SoC uses the same hardware version than STM32MP15. Only EXTI line mapping is changed and following EXTI lines are supported: GPIO, RTC, I2C[1-5], UxART[1-8], USBH_EHCI, USBH_OHCI, USB_OTG, LPTIM[1-5], ETH[1-2]. Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220202140005.860-3-alexandre.torgue@foss.st.com
1 parent d335092 commit 04133bb

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

drivers/irqchip/irq-stm32-exti.c

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,62 @@ static const struct stm32_desc_irq stm32mp1_desc_irq[] = {
214214
{ .exti = 73, .irq_parent = 129, .chip = &stm32_exti_h_chip },
215215
};
216216

217+
static const struct stm32_desc_irq stm32mp13_desc_irq[] = {
218+
{ .exti = 0, .irq_parent = 6, .chip = &stm32_exti_h_chip },
219+
{ .exti = 1, .irq_parent = 7, .chip = &stm32_exti_h_chip },
220+
{ .exti = 2, .irq_parent = 8, .chip = &stm32_exti_h_chip },
221+
{ .exti = 3, .irq_parent = 9, .chip = &stm32_exti_h_chip },
222+
{ .exti = 4, .irq_parent = 10, .chip = &stm32_exti_h_chip },
223+
{ .exti = 5, .irq_parent = 24, .chip = &stm32_exti_h_chip },
224+
{ .exti = 6, .irq_parent = 65, .chip = &stm32_exti_h_chip },
225+
{ .exti = 7, .irq_parent = 66, .chip = &stm32_exti_h_chip },
226+
{ .exti = 8, .irq_parent = 67, .chip = &stm32_exti_h_chip },
227+
{ .exti = 9, .irq_parent = 68, .chip = &stm32_exti_h_chip },
228+
{ .exti = 10, .irq_parent = 41, .chip = &stm32_exti_h_chip },
229+
{ .exti = 11, .irq_parent = 43, .chip = &stm32_exti_h_chip },
230+
{ .exti = 12, .irq_parent = 77, .chip = &stm32_exti_h_chip },
231+
{ .exti = 13, .irq_parent = 78, .chip = &stm32_exti_h_chip },
232+
{ .exti = 14, .irq_parent = 106, .chip = &stm32_exti_h_chip },
233+
{ .exti = 15, .irq_parent = 109, .chip = &stm32_exti_h_chip },
234+
{ .exti = 16, .irq_parent = 1, .chip = &stm32_exti_h_chip },
235+
{ .exti = 19, .irq_parent = 3, .chip = &stm32_exti_h_chip_direct },
236+
{ .exti = 21, .irq_parent = 32, .chip = &stm32_exti_h_chip_direct },
237+
{ .exti = 22, .irq_parent = 34, .chip = &stm32_exti_h_chip_direct },
238+
{ .exti = 23, .irq_parent = 73, .chip = &stm32_exti_h_chip_direct },
239+
{ .exti = 24, .irq_parent = 93, .chip = &stm32_exti_h_chip_direct },
240+
{ .exti = 25, .irq_parent = 114, .chip = &stm32_exti_h_chip_direct },
241+
{ .exti = 26, .irq_parent = 38, .chip = &stm32_exti_h_chip_direct },
242+
{ .exti = 27, .irq_parent = 39, .chip = &stm32_exti_h_chip_direct },
243+
{ .exti = 28, .irq_parent = 40, .chip = &stm32_exti_h_chip_direct },
244+
{ .exti = 29, .irq_parent = 72, .chip = &stm32_exti_h_chip_direct },
245+
{ .exti = 30, .irq_parent = 53, .chip = &stm32_exti_h_chip_direct },
246+
{ .exti = 31, .irq_parent = 54, .chip = &stm32_exti_h_chip_direct },
247+
{ .exti = 32, .irq_parent = 83, .chip = &stm32_exti_h_chip_direct },
248+
{ .exti = 33, .irq_parent = 84, .chip = &stm32_exti_h_chip_direct },
249+
{ .exti = 44, .irq_parent = 96, .chip = &stm32_exti_h_chip_direct },
250+
{ .exti = 47, .irq_parent = 92, .chip = &stm32_exti_h_chip_direct },
251+
{ .exti = 48, .irq_parent = 116, .chip = &stm32_exti_h_chip_direct },
252+
{ .exti = 50, .irq_parent = 117, .chip = &stm32_exti_h_chip_direct },
253+
{ .exti = 52, .irq_parent = 118, .chip = &stm32_exti_h_chip_direct },
254+
{ .exti = 53, .irq_parent = 119, .chip = &stm32_exti_h_chip_direct },
255+
{ .exti = 68, .irq_parent = 63, .chip = &stm32_exti_h_chip_direct },
256+
{ .exti = 70, .irq_parent = 98, .chip = &stm32_exti_h_chip_direct },
257+
};
258+
217259
static const struct stm32_exti_drv_data stm32mp1_drv_data = {
218260
.exti_banks = stm32mp1_exti_banks,
219261
.bank_nr = ARRAY_SIZE(stm32mp1_exti_banks),
220262
.desc_irqs = stm32mp1_desc_irq,
221263
.irq_nr = ARRAY_SIZE(stm32mp1_desc_irq),
222264
};
223265

266+
static const struct stm32_exti_drv_data stm32mp13_drv_data = {
267+
.exti_banks = stm32mp1_exti_banks,
268+
.bank_nr = ARRAY_SIZE(stm32mp1_exti_banks),
269+
.desc_irqs = stm32mp13_desc_irq,
270+
.irq_nr = ARRAY_SIZE(stm32mp13_desc_irq),
271+
};
272+
224273
static const struct
225274
stm32_desc_irq *stm32_exti_get_desc(const struct stm32_exti_drv_data *drv_data,
226275
irq_hw_number_t hwirq)
@@ -922,6 +971,7 @@ static int stm32_exti_probe(struct platform_device *pdev)
922971
/* platform driver only for MP1 */
923972
static const struct of_device_id stm32_exti_ids[] = {
924973
{ .compatible = "st,stm32mp1-exti", .data = &stm32mp1_drv_data},
974+
{ .compatible = "st,stm32mp13-exti", .data = &stm32mp13_drv_data},
925975
{},
926976
};
927977
MODULE_DEVICE_TABLE(of, stm32_exti_ids);

0 commit comments

Comments
 (0)