162306a36Sopenharmony_ciMicrochip PIC32 Interrupt Controller
262306a36Sopenharmony_ci====================================
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciThe Microchip PIC32 contains an Enhanced Vectored Interrupt Controller (EVIC).
562306a36Sopenharmony_ciIt handles all internal and external interrupts. This controller exists outside
662306a36Sopenharmony_ciof the CPU and is the arbitrator of all interrupts (including interrupts from
762306a36Sopenharmony_cithe CPU itself) before they are presented to the CPU.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciExternal interrupts have a software configurable edge polarity. Non external
1062306a36Sopenharmony_ciinterrupts have a type and polarity that is determined by the source of the
1162306a36Sopenharmony_ciinterrupt.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciRequired properties
1462306a36Sopenharmony_ci-------------------
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci- compatible: Should be "microchip,pic32mzda-evic"
1762306a36Sopenharmony_ci- reg: Specifies physical base address and size of register range.
1862306a36Sopenharmony_ci- interrupt-controller: Identifies the node as an interrupt controller.
1962306a36Sopenharmony_ci- #interrupt cells: Specifies the number of cells used to encode an interrupt
2062306a36Sopenharmony_ci  source connected to this controller. The value shall be 2 and interrupt
2162306a36Sopenharmony_ci  descriptor shall have the following format:
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci	<hw_irq irq_type>
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci  hw_irq - represents the hardware interrupt number as in the data sheet.
2662306a36Sopenharmony_ci  irq_type - is used to describe the type and polarity of an interrupt. For
2762306a36Sopenharmony_ci  internal interrupts use IRQ_TYPE_EDGE_RISING for non persistent interrupts and
2862306a36Sopenharmony_ci  IRQ_TYPE_LEVEL_HIGH for persistent interrupts. For external interrupts use
2962306a36Sopenharmony_ci  IRQ_TYPE_EDGE_RISING or IRQ_TYPE_EDGE_FALLING to select the desired polarity.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ciOptional properties
3262306a36Sopenharmony_ci-------------------
3362306a36Sopenharmony_ci- microchip,external-irqs: u32 array of external interrupts with software
3462306a36Sopenharmony_ci  polarity configuration. This array corresponds to the bits in the INTCON
3562306a36Sopenharmony_ci  SFR.
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_ciExample
3862306a36Sopenharmony_ci-------
3962306a36Sopenharmony_ci
4062306a36Sopenharmony_cievic: interrupt-controller@1f810000 {
4162306a36Sopenharmony_ci	compatible = "microchip,pic32mzda-evic";
4262306a36Sopenharmony_ci	interrupt-controller;
4362306a36Sopenharmony_ci	#interrupt-cells = <2>;
4462306a36Sopenharmony_ci	reg = <0x1f810000 0x1000>;
4562306a36Sopenharmony_ci	microchip,external-irqs = <3 8 13 18 23>;
4662306a36Sopenharmony_ci};
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciEach device/peripheral must request its interrupt line with the associated type
4962306a36Sopenharmony_ciand polarity.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ciInternal interrupt DTS snippet
5262306a36Sopenharmony_ci------------------------------
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_cidevice@1f800000 {
5562306a36Sopenharmony_ci	...
5662306a36Sopenharmony_ci	interrupts = <113 IRQ_TYPE_LEVEL_HIGH>;
5762306a36Sopenharmony_ci	...
5862306a36Sopenharmony_ci};
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciExternal interrupt DTS snippet
6162306a36Sopenharmony_ci------------------------------
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_cidevice@1f800000 {
6462306a36Sopenharmony_ci	...
6562306a36Sopenharmony_ci	interrupts = <3 IRQ_TYPE_EDGE_RISING>;
6662306a36Sopenharmony_ci	...
6762306a36Sopenharmony_ci};
68