1*c66ec88fSEmmanuel VadotMicrochip PIC32 Interrupt Controller 2*c66ec88fSEmmanuel Vadot==================================== 3*c66ec88fSEmmanuel Vadot 4*c66ec88fSEmmanuel VadotThe Microchip PIC32 contains an Enhanced Vectored Interrupt Controller (EVIC). 5*c66ec88fSEmmanuel VadotIt handles all internal and external interrupts. This controller exists outside 6*c66ec88fSEmmanuel Vadotof the CPU and is the arbitrator of all interrupts (including interrupts from 7*c66ec88fSEmmanuel Vadotthe CPU itself) before they are presented to the CPU. 8*c66ec88fSEmmanuel Vadot 9*c66ec88fSEmmanuel VadotExternal interrupts have a software configurable edge polarity. Non external 10*c66ec88fSEmmanuel Vadotinterrupts have a type and polarity that is determined by the source of the 11*c66ec88fSEmmanuel Vadotinterrupt. 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel VadotRequired properties 14*c66ec88fSEmmanuel Vadot------------------- 15*c66ec88fSEmmanuel Vadot 16*c66ec88fSEmmanuel Vadot- compatible: Should be "microchip,pic32mzda-evic" 17*c66ec88fSEmmanuel Vadot- reg: Specifies physical base address and size of register range. 18*c66ec88fSEmmanuel Vadot- interrupt-controller: Identifies the node as an interrupt controller. 19*c66ec88fSEmmanuel Vadot- #interrupt cells: Specifies the number of cells used to encode an interrupt 20*c66ec88fSEmmanuel Vadot source connected to this controller. The value shall be 2 and interrupt 21*c66ec88fSEmmanuel Vadot descriptor shall have the following format: 22*c66ec88fSEmmanuel Vadot 23*c66ec88fSEmmanuel Vadot <hw_irq irq_type> 24*c66ec88fSEmmanuel Vadot 25*c66ec88fSEmmanuel Vadot hw_irq - represents the hardware interrupt number as in the data sheet. 26*c66ec88fSEmmanuel Vadot irq_type - is used to describe the type and polarity of an interrupt. For 27*c66ec88fSEmmanuel Vadot internal interrupts use IRQ_TYPE_EDGE_RISING for non persistent interrupts and 28*c66ec88fSEmmanuel Vadot IRQ_TYPE_LEVEL_HIGH for persistent interrupts. For external interrupts use 29*c66ec88fSEmmanuel Vadot IRQ_TYPE_EDGE_RISING or IRQ_TYPE_EDGE_FALLING to select the desired polarity. 30*c66ec88fSEmmanuel Vadot 31*c66ec88fSEmmanuel VadotOptional properties 32*c66ec88fSEmmanuel Vadot------------------- 33*c66ec88fSEmmanuel Vadot- microchip,external-irqs: u32 array of external interrupts with software 34*c66ec88fSEmmanuel Vadot polarity configuration. This array corresponds to the bits in the INTCON 35*c66ec88fSEmmanuel Vadot SFR. 36*c66ec88fSEmmanuel Vadot 37*c66ec88fSEmmanuel VadotExample 38*c66ec88fSEmmanuel Vadot------- 39*c66ec88fSEmmanuel Vadot 40*c66ec88fSEmmanuel Vadotevic: interrupt-controller@1f810000 { 41*c66ec88fSEmmanuel Vadot compatible = "microchip,pic32mzda-evic"; 42*c66ec88fSEmmanuel Vadot interrupt-controller; 43*c66ec88fSEmmanuel Vadot #interrupt-cells = <2>; 44*c66ec88fSEmmanuel Vadot reg = <0x1f810000 0x1000>; 45*c66ec88fSEmmanuel Vadot microchip,external-irqs = <3 8 13 18 23>; 46*c66ec88fSEmmanuel Vadot}; 47*c66ec88fSEmmanuel Vadot 48*c66ec88fSEmmanuel VadotEach device/peripheral must request its interrupt line with the associated type 49*c66ec88fSEmmanuel Vadotand polarity. 50*c66ec88fSEmmanuel Vadot 51*c66ec88fSEmmanuel VadotInternal interrupt DTS snippet 52*c66ec88fSEmmanuel Vadot------------------------------ 53*c66ec88fSEmmanuel Vadot 54*c66ec88fSEmmanuel Vadotdevice@1f800000 { 55*c66ec88fSEmmanuel Vadot ... 56*c66ec88fSEmmanuel Vadot interrupts = <113 IRQ_TYPE_LEVEL_HIGH>; 57*c66ec88fSEmmanuel Vadot ... 58*c66ec88fSEmmanuel Vadot}; 59*c66ec88fSEmmanuel Vadot 60*c66ec88fSEmmanuel VadotExternal interrupt DTS snippet 61*c66ec88fSEmmanuel Vadot------------------------------ 62*c66ec88fSEmmanuel Vadot 63*c66ec88fSEmmanuel Vadotdevice@1f800000 { 64*c66ec88fSEmmanuel Vadot ... 65*c66ec88fSEmmanuel Vadot interrupts = <3 IRQ_TYPE_EDGE_RISING>; 66*c66ec88fSEmmanuel Vadot ... 67*c66ec88fSEmmanuel Vadot}; 68