xref: /freebsd-src/sys/contrib/device-tree/Bindings/interrupt-controller/marvell,icu.txt (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1*c66ec88fSEmmanuel VadotMarvell ICU Interrupt Controller
2*c66ec88fSEmmanuel Vadot--------------------------------
3*c66ec88fSEmmanuel Vadot
4*c66ec88fSEmmanuel VadotThe Marvell ICU (Interrupt Consolidation Unit) controller is
5*c66ec88fSEmmanuel Vadotresponsible for collecting all wired-interrupt sources in the CP and
6*c66ec88fSEmmanuel Vadotcommunicating them to the GIC in the AP, the unit translates interrupt
7*c66ec88fSEmmanuel Vadotrequests on input wires to MSG memory mapped transactions to the GIC.
8*c66ec88fSEmmanuel VadotThese messages will access a different GIC memory area depending on
9*c66ec88fSEmmanuel Vadottheir type (NSR, SR, SEI, REI, etc).
10*c66ec88fSEmmanuel Vadot
11*c66ec88fSEmmanuel VadotRequired properties:
12*c66ec88fSEmmanuel Vadot
13*c66ec88fSEmmanuel Vadot- compatible: Should be "marvell,cp110-icu"
14*c66ec88fSEmmanuel Vadot
15*c66ec88fSEmmanuel Vadot- reg: Should contain ICU registers location and length.
16*c66ec88fSEmmanuel Vadot
17*c66ec88fSEmmanuel VadotSubnodes: Each group of interrupt is declared as a subnode of the ICU,
18*c66ec88fSEmmanuel Vadotwith their own compatible.
19*c66ec88fSEmmanuel Vadot
20*c66ec88fSEmmanuel VadotRequired properties for the icu_nsr/icu_sei subnodes:
21*c66ec88fSEmmanuel Vadot
22*c66ec88fSEmmanuel Vadot- compatible: Should be one of:
23*c66ec88fSEmmanuel Vadot              * "marvell,cp110-icu-nsr"
24*c66ec88fSEmmanuel Vadot	      * "marvell,cp110-icu-sr"
25*c66ec88fSEmmanuel Vadot	      * "marvell,cp110-icu-sei"
26*c66ec88fSEmmanuel Vadot	      * "marvell,cp110-icu-rei"
27*c66ec88fSEmmanuel Vadot
28*c66ec88fSEmmanuel Vadot- #interrupt-cells: Specifies the number of cells needed to encode an
29*c66ec88fSEmmanuel Vadot  interrupt source. The value shall be 2.
30*c66ec88fSEmmanuel Vadot
31*c66ec88fSEmmanuel Vadot  The 1st cell is the index of the interrupt in the ICU unit.
32*c66ec88fSEmmanuel Vadot
33*c66ec88fSEmmanuel Vadot  The 2nd cell is the type of the interrupt. See arm,gic.txt for
34*c66ec88fSEmmanuel Vadot  details.
35*c66ec88fSEmmanuel Vadot
36*c66ec88fSEmmanuel Vadot- interrupt-controller: Identifies the node as an interrupt
37*c66ec88fSEmmanuel Vadot  controller.
38*c66ec88fSEmmanuel Vadot
39*c66ec88fSEmmanuel Vadot- msi-parent: Should point to the GICP controller, the GIC extension
40*c66ec88fSEmmanuel Vadot  that allows to trigger interrupts using MSG memory mapped
41*c66ec88fSEmmanuel Vadot  transactions.
42*c66ec88fSEmmanuel Vadot
43*c66ec88fSEmmanuel VadotNote: each 'interrupts' property referring to any 'icu_xxx' node shall
44*c66ec88fSEmmanuel Vadot      have a different number within [0:206].
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel VadotExample:
47*c66ec88fSEmmanuel Vadot
48*c66ec88fSEmmanuel Vadoticu: interrupt-controller@1e0000 {
49*c66ec88fSEmmanuel Vadot	compatible = "marvell,cp110-icu";
50*c66ec88fSEmmanuel Vadot	reg = <0x1e0000 0x440>;
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadot	CP110_LABEL(icu_nsr): interrupt-controller@10 {
53*c66ec88fSEmmanuel Vadot		compatible = "marvell,cp110-icu-nsr";
54*c66ec88fSEmmanuel Vadot		reg = <0x10 0x20>;
55*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
56*c66ec88fSEmmanuel Vadot		interrupt-controller;
57*c66ec88fSEmmanuel Vadot		msi-parent = <&gicp>;
58*c66ec88fSEmmanuel Vadot	};
59*c66ec88fSEmmanuel Vadot
60*c66ec88fSEmmanuel Vadot	CP110_LABEL(icu_sei): interrupt-controller@50 {
61*c66ec88fSEmmanuel Vadot		compatible = "marvell,cp110-icu-sei";
62*c66ec88fSEmmanuel Vadot		reg = <0x50 0x10>;
63*c66ec88fSEmmanuel Vadot		#interrupt-cells = <2>;
64*c66ec88fSEmmanuel Vadot		interrupt-controller;
65*c66ec88fSEmmanuel Vadot		msi-parent = <&sei>;
66*c66ec88fSEmmanuel Vadot	};
67*c66ec88fSEmmanuel Vadot};
68*c66ec88fSEmmanuel Vadot
69*c66ec88fSEmmanuel Vadotnode1 {
70*c66ec88fSEmmanuel Vadot	interrupt-parent = <&icu_nsr>;
71*c66ec88fSEmmanuel Vadot	interrupts = <106 IRQ_TYPE_LEVEL_HIGH>;
72*c66ec88fSEmmanuel Vadot};
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel Vadotnode2 {
75*c66ec88fSEmmanuel Vadot	interrupt-parent = <&icu_sei>;
76*c66ec88fSEmmanuel Vadot	interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
77*c66ec88fSEmmanuel Vadot};
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadot/* Would not work with the above nodes */
80*c66ec88fSEmmanuel Vadotnode3 {
81*c66ec88fSEmmanuel Vadot	interrupt-parent = <&icu_nsr>;
82*c66ec88fSEmmanuel Vadot	interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
83*c66ec88fSEmmanuel Vadot};
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel VadotThe legacy bindings were different in this way:
86*c66ec88fSEmmanuel Vadot
87*c66ec88fSEmmanuel Vadot- #interrupt-cells: The value was 3.
88*c66ec88fSEmmanuel Vadot	The 1st cell was the group type of the ICU interrupt. Possible
89*c66ec88fSEmmanuel Vadot	group types were:
90*c66ec88fSEmmanuel Vadot	ICU_GRP_NSR (0x0) : Shared peripheral interrupt, non-secure
91*c66ec88fSEmmanuel Vadot	ICU_GRP_SR  (0x1) : Shared peripheral interrupt, secure
92*c66ec88fSEmmanuel Vadot	ICU_GRP_SEI (0x4) : System error interrupt
93*c66ec88fSEmmanuel Vadot	ICU_GRP_REI (0x5) : RAM error interrupt
94*c66ec88fSEmmanuel Vadot	The 2nd cell was the index of the interrupt in the ICU unit.
95*c66ec88fSEmmanuel Vadot	The 3rd cell was the type of the interrupt. See arm,gic.txt for
96*c66ec88fSEmmanuel Vadot	details.
97*c66ec88fSEmmanuel Vadot
98*c66ec88fSEmmanuel VadotExample:
99*c66ec88fSEmmanuel Vadot
100*c66ec88fSEmmanuel Vadoticu: interrupt-controller@1e0000 {
101*c66ec88fSEmmanuel Vadot	compatible = "marvell,cp110-icu";
102*c66ec88fSEmmanuel Vadot	reg = <0x1e0000 0x440>;
103*c66ec88fSEmmanuel Vadot
104*c66ec88fSEmmanuel Vadot	#interrupt-cells = <3>;
105*c66ec88fSEmmanuel Vadot	interrupt-controller;
106*c66ec88fSEmmanuel Vadot	msi-parent = <&gicp>;
107*c66ec88fSEmmanuel Vadot};
108*c66ec88fSEmmanuel Vadot
109*c66ec88fSEmmanuel Vadotnode1 {
110*c66ec88fSEmmanuel Vadot	interrupt-parent = <&icu>;
111*c66ec88fSEmmanuel Vadot	interrupts = <ICU_GRP_NSR 106 IRQ_TYPE_LEVEL_HIGH>;
112*c66ec88fSEmmanuel Vadot};
113