18c2ecf20Sopenharmony_ciC6X Interrupt Chips 28c2ecf20Sopenharmony_ci------------------- 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci* C64X+ Core Interrupt Controller 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci The core interrupt controller provides 16 prioritized interrupts to the 78c2ecf20Sopenharmony_ci C64X+ core. Priority 0 and 1 are used for reset and NMI respectively. 88c2ecf20Sopenharmony_ci Priority 2 and 3 are reserved. Priority 4-15 are used for interrupt 98c2ecf20Sopenharmony_ci sources coming from outside the core. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci Required properties: 128c2ecf20Sopenharmony_ci -------------------- 138c2ecf20Sopenharmony_ci - compatible: Should be "ti,c64x+core-pic"; 148c2ecf20Sopenharmony_ci - #interrupt-cells: <1> 158c2ecf20Sopenharmony_ci 168c2ecf20Sopenharmony_ci Interrupt Specifier Definition 178c2ecf20Sopenharmony_ci ------------------------------ 188c2ecf20Sopenharmony_ci Single cell specifying the core interrupt priority level (4-15) where 198c2ecf20Sopenharmony_ci 4 is highest priority and 15 is lowest priority. 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci Example 228c2ecf20Sopenharmony_ci ------- 238c2ecf20Sopenharmony_ci core_pic: interrupt-controller@0 { 248c2ecf20Sopenharmony_ci interrupt-controller; 258c2ecf20Sopenharmony_ci #interrupt-cells = <1>; 268c2ecf20Sopenharmony_ci compatible = "ti,c64x+core-pic"; 278c2ecf20Sopenharmony_ci }; 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_ci* C64x+ Megamodule Interrupt Controller 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci The megamodule PIC consists of four interrupt mupliplexers each of which 348c2ecf20Sopenharmony_ci combine up to 32 interrupt inputs into a single interrupt output which 358c2ecf20Sopenharmony_ci may be cascaded into the core interrupt controller. The megamodule PIC 368c2ecf20Sopenharmony_ci has a total of 12 outputs cascading into the core interrupt controller. 378c2ecf20Sopenharmony_ci One for each core interrupt priority level. In addition to the combined 388c2ecf20Sopenharmony_ci interrupt sources, individual megamodule interrupts may be cascaded to 398c2ecf20Sopenharmony_ci the core interrupt controller. When an individual interrupt is cascaded, 408c2ecf20Sopenharmony_ci it is no longer handled through a megamodule interrupt combiner and is 418c2ecf20Sopenharmony_ci considered to have the core interrupt controller as the parent. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci Required properties: 448c2ecf20Sopenharmony_ci -------------------- 458c2ecf20Sopenharmony_ci - compatible: "ti,c64x+megamod-pic" 468c2ecf20Sopenharmony_ci - interrupt-controller 478c2ecf20Sopenharmony_ci - #interrupt-cells: <1> 488c2ecf20Sopenharmony_ci - reg: base address and size of register area 498c2ecf20Sopenharmony_ci - interrupts: This should have four cells; one for each interrupt combiner. 508c2ecf20Sopenharmony_ci The cells contain the core priority interrupt to which the 518c2ecf20Sopenharmony_ci corresponding combiner output is wired. 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci Optional properties: 548c2ecf20Sopenharmony_ci -------------------- 558c2ecf20Sopenharmony_ci - ti,c64x+megamod-pic-mux: Array of 12 cells correspnding to the 12 core 568c2ecf20Sopenharmony_ci priority interrupts. The first cell corresponds to 578c2ecf20Sopenharmony_ci core priority 4 and the last cell corresponds to 588c2ecf20Sopenharmony_ci core priority 15. The value of each cell is the 598c2ecf20Sopenharmony_ci megamodule interrupt source which is MUXed to 608c2ecf20Sopenharmony_ci the core interrupt corresponding to the cell 618c2ecf20Sopenharmony_ci position. Allowed values are 4 - 127. Mapping for 628c2ecf20Sopenharmony_ci interrupts 0 - 3 (combined interrupt sources) are 638c2ecf20Sopenharmony_ci ignored. 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ci Interrupt Specifier Definition 668c2ecf20Sopenharmony_ci ------------------------------ 678c2ecf20Sopenharmony_ci Single cell specifying the megamodule interrupt source (4-127). Note that 688c2ecf20Sopenharmony_ci interrupts mapped directly to the core with "ti,c64x+megamod-pic-mux" will 698c2ecf20Sopenharmony_ci use the core interrupt controller as their parent and the specifier will 708c2ecf20Sopenharmony_ci be the core priority level, not the megamodule interrupt number. 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci Examples 738c2ecf20Sopenharmony_ci -------- 748c2ecf20Sopenharmony_ci megamod_pic: interrupt-controller@1800000 { 758c2ecf20Sopenharmony_ci compatible = "ti,c64x+megamod-pic"; 768c2ecf20Sopenharmony_ci interrupt-controller; 778c2ecf20Sopenharmony_ci #interrupt-cells = <1>; 788c2ecf20Sopenharmony_ci reg = <0x1800000 0x1000>; 798c2ecf20Sopenharmony_ci interrupt-parent = <&core_pic>; 808c2ecf20Sopenharmony_ci interrupts = < 12 13 14 15 >; 818c2ecf20Sopenharmony_ci }; 828c2ecf20Sopenharmony_ci 838c2ecf20Sopenharmony_ci This is a minimal example where all individual interrupts go through a 848c2ecf20Sopenharmony_ci combiner. Combiner-0 is mapped to core interrupt 12, combiner-1 is mapped 858c2ecf20Sopenharmony_ci to interrupt 13, etc. 868c2ecf20Sopenharmony_ci 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci megamod_pic: interrupt-controller@1800000 { 898c2ecf20Sopenharmony_ci compatible = "ti,c64x+megamod-pic"; 908c2ecf20Sopenharmony_ci interrupt-controller; 918c2ecf20Sopenharmony_ci #interrupt-cells = <1>; 928c2ecf20Sopenharmony_ci reg = <0x1800000 0x1000>; 938c2ecf20Sopenharmony_ci interrupt-parent = <&core_pic>; 948c2ecf20Sopenharmony_ci interrupts = < 12 13 14 15 >; 958c2ecf20Sopenharmony_ci ti,c64x+megamod-pic-mux = < 0 0 0 0 968c2ecf20Sopenharmony_ci 32 0 0 0 978c2ecf20Sopenharmony_ci 0 0 0 0 >; 988c2ecf20Sopenharmony_ci }; 998c2ecf20Sopenharmony_ci 1008c2ecf20Sopenharmony_ci This the same as the first example except that megamodule interrupt 32 is 1018c2ecf20Sopenharmony_ci mapped directly to core priority interrupt 8. The node using this interrupt 1028c2ecf20Sopenharmony_ci must set the core controller as its interrupt parent and use 8 in the 1038c2ecf20Sopenharmony_ci interrupt specifier value. 104