162306a36Sopenharmony_ciMarvell ICU Interrupt Controller
262306a36Sopenharmony_ci--------------------------------
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciThe Marvell ICU (Interrupt Consolidation Unit) controller is
562306a36Sopenharmony_ciresponsible for collecting all wired-interrupt sources in the CP and
662306a36Sopenharmony_cicommunicating them to the GIC in the AP, the unit translates interrupt
762306a36Sopenharmony_cirequests on input wires to MSG memory mapped transactions to the GIC.
862306a36Sopenharmony_ciThese messages will access a different GIC memory area depending on
962306a36Sopenharmony_citheir type (NSR, SR, SEI, REI, etc).
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ciRequired properties:
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci- compatible: Should be "marvell,cp110-icu"
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci- reg: Should contain ICU registers location and length.
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciSubnodes: Each group of interrupt is declared as a subnode of the ICU,
1862306a36Sopenharmony_ciwith their own compatible.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciRequired properties for the icu_nsr/icu_sei subnodes:
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ci- compatible: Should be one of:
2362306a36Sopenharmony_ci              * "marvell,cp110-icu-nsr"
2462306a36Sopenharmony_ci	      * "marvell,cp110-icu-sr"
2562306a36Sopenharmony_ci	      * "marvell,cp110-icu-sei"
2662306a36Sopenharmony_ci	      * "marvell,cp110-icu-rei"
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci- #interrupt-cells: Specifies the number of cells needed to encode an
2962306a36Sopenharmony_ci  interrupt source. The value shall be 2.
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci  The 1st cell is the index of the interrupt in the ICU unit.
3262306a36Sopenharmony_ci
3362306a36Sopenharmony_ci  The 2nd cell is the type of the interrupt. See arm,gic.txt for
3462306a36Sopenharmony_ci  details.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci- interrupt-controller: Identifies the node as an interrupt
3762306a36Sopenharmony_ci  controller.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ci- msi-parent: Should point to the GICP controller, the GIC extension
4062306a36Sopenharmony_ci  that allows to trigger interrupts using MSG memory mapped
4162306a36Sopenharmony_ci  transactions.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ciNote: each 'interrupts' property referring to any 'icu_xxx' node shall
4462306a36Sopenharmony_ci      have a different number within [0:206].
4562306a36Sopenharmony_ci
4662306a36Sopenharmony_ciExample:
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ciicu: interrupt-controller@1e0000 {
4962306a36Sopenharmony_ci	compatible = "marvell,cp110-icu";
5062306a36Sopenharmony_ci	reg = <0x1e0000 0x440>;
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_ci	CP110_LABEL(icu_nsr): interrupt-controller@10 {
5362306a36Sopenharmony_ci		compatible = "marvell,cp110-icu-nsr";
5462306a36Sopenharmony_ci		reg = <0x10 0x20>;
5562306a36Sopenharmony_ci		#interrupt-cells = <2>;
5662306a36Sopenharmony_ci		interrupt-controller;
5762306a36Sopenharmony_ci		msi-parent = <&gicp>;
5862306a36Sopenharmony_ci	};
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ci	CP110_LABEL(icu_sei): interrupt-controller@50 {
6162306a36Sopenharmony_ci		compatible = "marvell,cp110-icu-sei";
6262306a36Sopenharmony_ci		reg = <0x50 0x10>;
6362306a36Sopenharmony_ci		#interrupt-cells = <2>;
6462306a36Sopenharmony_ci		interrupt-controller;
6562306a36Sopenharmony_ci		msi-parent = <&sei>;
6662306a36Sopenharmony_ci	};
6762306a36Sopenharmony_ci};
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_cinode1 {
7062306a36Sopenharmony_ci	interrupt-parent = <&icu_nsr>;
7162306a36Sopenharmony_ci	interrupts = <106 IRQ_TYPE_LEVEL_HIGH>;
7262306a36Sopenharmony_ci};
7362306a36Sopenharmony_ci
7462306a36Sopenharmony_cinode2 {
7562306a36Sopenharmony_ci	interrupt-parent = <&icu_sei>;
7662306a36Sopenharmony_ci	interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
7762306a36Sopenharmony_ci};
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci/* Would not work with the above nodes */
8062306a36Sopenharmony_cinode3 {
8162306a36Sopenharmony_ci	interrupt-parent = <&icu_nsr>;
8262306a36Sopenharmony_ci	interrupts = <107 IRQ_TYPE_LEVEL_HIGH>;
8362306a36Sopenharmony_ci};
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciThe legacy bindings were different in this way:
8662306a36Sopenharmony_ci
8762306a36Sopenharmony_ci- #interrupt-cells: The value was 3.
8862306a36Sopenharmony_ci	The 1st cell was the group type of the ICU interrupt. Possible
8962306a36Sopenharmony_ci	group types were:
9062306a36Sopenharmony_ci	ICU_GRP_NSR (0x0) : Shared peripheral interrupt, non-secure
9162306a36Sopenharmony_ci	ICU_GRP_SR  (0x1) : Shared peripheral interrupt, secure
9262306a36Sopenharmony_ci	ICU_GRP_SEI (0x4) : System error interrupt
9362306a36Sopenharmony_ci	ICU_GRP_REI (0x5) : RAM error interrupt
9462306a36Sopenharmony_ci	The 2nd cell was the index of the interrupt in the ICU unit.
9562306a36Sopenharmony_ci	The 3rd cell was the type of the interrupt. See arm,gic.txt for
9662306a36Sopenharmony_ci	details.
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciExample:
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ciicu: interrupt-controller@1e0000 {
10162306a36Sopenharmony_ci	compatible = "marvell,cp110-icu";
10262306a36Sopenharmony_ci	reg = <0x1e0000 0x440>;
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ci	#interrupt-cells = <3>;
10562306a36Sopenharmony_ci	interrupt-controller;
10662306a36Sopenharmony_ci	msi-parent = <&gicp>;
10762306a36Sopenharmony_ci};
10862306a36Sopenharmony_ci
10962306a36Sopenharmony_cinode1 {
11062306a36Sopenharmony_ci	interrupt-parent = <&icu>;
11162306a36Sopenharmony_ci	interrupts = <ICU_GRP_NSR 106 IRQ_TYPE_LEVEL_HIGH>;
11262306a36Sopenharmony_ci};
113