AM6442: Example on PRU-ICSSG to A53 interrupts

Part Number: AM6442

Tool/software:

Hello everybody,

Can the PRU-ICSSG raise an interrupt to A53?
Is there some kind of example doing this including the kernel-side mapping of the incoming interrupt?

Thanks in advantage.

  • Hi ,

    Thanks for your query.

    Can you provide more info about your use case ? RTOS or Linux ?

    Regards

    Ashwani

  • Hello Ashwani,

    I am using Linux from the SDK v10.00.07.04.

    I expect remoteproc to launch the pru application configured to raise the interrupt  (such as pr0_pru_mst_intr[0]_intr_req) and a custom kernel driver to handle the incoming interrupt. Is it right?

    I already looked at the RPMsg samples in the SDK, and I understood how the PRU can raise an interrupt, but I still don't understand how the A53 core can indentify and serve the interrupt. How the device tree should map the interrupt? Is the GICSS0_SPI_IN_120 / PRU_ICSSG0_PR1_HOST_INTR_PEND_0 the interrupt to be used? How the kernel driver can register this interrupt?

  • Hi ,

    Thanks for info.

    I am forwarding your query to Linux-IPC expert.

    Regards

    Ashwani

  • Hello!
    Any news about this?

  • That TI Dallas based TI e2e IPC Linux expert is on holiday until 1/2. He is also well versed in PRU interactions.

  • Hello Federico,

    Yes, you configure the interrupts in the Linux device tree.

    First off, where's the documentation for setting up PRU client driver interrupts? 

    Please refer to my comments in the intc_map_0.h file in the PRU Software Support Package (PSSP) examples. They provide guidance on what you should be doing from the Linux side:
    https://git.ti.com/cgit/pru-software-support-package/pru-software-support-package/tree/examples/am64x/PRU_RPMsg_Echo_Interrupt0/intc_map_0.h 

    Ok, so where is the example I can copy?

    The configuration for the RPMsg example is a bit hidden. Usually, I suggest that customers make their changes in the top-level, board configuration .dts file (that way you guarantee that your code isn't getting overwritten by any other .dts files that include the file you made changes in). However, for the RPMsg example, we configured the PRU interrupts directly in the PRU core definitions:

    ti-linux-kernel-6.6.32+git-ti/arch/arm64/boot/dts/ti/k3-am64-main.dtsi

            icssg0: icssg@30000000 {
                    compatible = "ti,am642-icssg";
                    reg = <0x00 0x30000000 0x00 0x80000>;
    ...
    // all PRU interrupts going to Linux are defined here
                    icssg0_intc: interrupt-controller@20000 {
                            compatible = "ti,icssg-intc";
                            reg = <0x20000 0x2000>;
                            interrupt-controller;
                            #interrupt-cells = <3>;
                            interrupts = <GIC_SPI 88 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 90 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 91 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>,
                                         <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH>;
                            interrupt-names = "host_intr0", "host_intr1",
                                              "host_intr2", "host_intr3",
                                              "host_intr4", "host_intr5",
                                              "host_intr6", "host_intr7";
                    };
    ...                
    // now we configure the interrupt mapping as documented in the intc map file.
                    pru0_0: pru@34000 {
    ...
                            interrupt-parent = <&icssg0_intc>;
                            interrupts = <16 2 2>;
                            interrupt-names = "vring";
                    };
    
                    rtu0_0: rtu@4000 {
    ...
                            interrupt-parent = <&icssg0_intc>;
                            interrupts = <20 4 4>;
                            interrupt-names = "vring";
                    };
    

    Regards,

    Nick