1*c66ec88fSEmmanuel Vadot* SPEAr Shared IRQ layer (shirq) 2*c66ec88fSEmmanuel Vadot 3*c66ec88fSEmmanuel VadotSPEAr3xx architecture includes shared/multiplexed irqs for certain set 4*c66ec88fSEmmanuel Vadotof devices. The multiplexor provides a single interrupt to parent 5*c66ec88fSEmmanuel Vadotinterrupt controller (VIC) on behalf of a group of devices. 6*c66ec88fSEmmanuel Vadot 7*c66ec88fSEmmanuel VadotThere can be multiple groups available on SPEAr3xx variants but not 8*c66ec88fSEmmanuel Vadotexceeding 4. The number of devices in a group can differ, further they 9*c66ec88fSEmmanuel Vadotmay share same set of status/mask registers spanning across different 10*c66ec88fSEmmanuel Vadotbit masks. Also in some cases the group may not have enable or other 11*c66ec88fSEmmanuel Vadotregisters. This makes software little complex. 12*c66ec88fSEmmanuel Vadot 13*c66ec88fSEmmanuel VadotA single node in the device tree is used to describe the shared 14*c66ec88fSEmmanuel Vadotinterrupt multiplexor (one node for all groups). A group in the 15*c66ec88fSEmmanuel Vadotinterrupt controller shares config/control registers with other groups. 16*c66ec88fSEmmanuel VadotFor example, a 32-bit interrupt enable/disable config register can 17*c66ec88fSEmmanuel Vadotaccommodate up to 4 interrupt groups. 18*c66ec88fSEmmanuel Vadot 19*c66ec88fSEmmanuel VadotRequired properties: 20*c66ec88fSEmmanuel Vadot - compatible: should be, either of 21*c66ec88fSEmmanuel Vadot - "st,spear300-shirq" 22*c66ec88fSEmmanuel Vadot - "st,spear310-shirq" 23*c66ec88fSEmmanuel Vadot - "st,spear320-shirq" 24*c66ec88fSEmmanuel Vadot - interrupt-controller: Identifies the node as an interrupt controller. 25*c66ec88fSEmmanuel Vadot - #interrupt-cells: should be <1> which basically contains the offset 26*c66ec88fSEmmanuel Vadot (starting from 0) of interrupts for all the groups. 27*c66ec88fSEmmanuel Vadot - reg: Base address and size of shirq registers. 28*c66ec88fSEmmanuel Vadot - interrupts: The list of interrupts generated by the groups which are 29*c66ec88fSEmmanuel Vadot then connected to a parent interrupt controller. Each group is 30*c66ec88fSEmmanuel Vadot associated with one of the interrupts, hence number of interrupts (to 31*c66ec88fSEmmanuel Vadot parent) is equal to number of groups. The format of the interrupt 32*c66ec88fSEmmanuel Vadot specifier depends in the interrupt parent controller. 33*c66ec88fSEmmanuel Vadot 34*c66ec88fSEmmanuel VadotExample: 35*c66ec88fSEmmanuel Vadot 36*c66ec88fSEmmanuel VadotThe following is an example from the SPEAr320 SoC dtsi file. 37*c66ec88fSEmmanuel Vadot 38*c66ec88fSEmmanuel Vadotshirq: interrupt-controller@b3000000 { 39*c66ec88fSEmmanuel Vadot compatible = "st,spear320-shirq"; 40*c66ec88fSEmmanuel Vadot reg = <0xb3000000 0x1000>; 41*c66ec88fSEmmanuel Vadot interrupts = <28 29 30 1>; 42*c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 43*c66ec88fSEmmanuel Vadot interrupt-controller; 44*c66ec88fSEmmanuel Vadot}; 45