This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/EVMK2H: EDMA3 Testing

Part Number: EVMK2H

Tool/software: Linux

I'd like to have an example Linux application that uses the EDMA.

From the Processor SDK, I see that

- the kernel driver is included: git.ti.com/.../uio-module-drv

- and the device tree has an entry: keystone-uio.dtsi

uio_edma3: edma3 {
    compatible = "ti,uio-module-drv";
    mem = <0x02700000 0x000C0000>;
};

What steps should I take to be able to use the EDMA? Is there any existing test software or documentation available for creating one?

Thanks

  • Hi,


    Have you tried testing the dma test provided in linux kernel? Documentation on how to use it can be found in: Documentation/dmaengine/dmatest.txt


    Best Regards,
    Yordan

  • Yes, but I'm missing arguments to perform the test.

    The documentation provides the example:

    modprobe dmatest channel=dma0chan0 timeout=2000 iterations=1 run=1

    where "dma0chan0" is the name of an available channel that would be listed under:

    ls -1 /sys/class/dma/

    But on my system, I see no available channels.

  • Hi, j e,

    All 5 of the EDMA3 CC are not enabled in K2H release. Please refer to K2G DTS file, keystone-k2g.dtsi, on how to enable them.

    We don't have example of using EDMA on K2H and the User Space application is not in TI support scope. I know PCIe EP test on other device uses EDMA which may give you some idea, but again, that is on different device, AM5728, and in the PLSDK for that device. The code is in linux/drivers/misc/pci_endpoint_test.c. 

    Rex

  • Ok, so from keystone-k2g.dtsi, we have

    edma0: edma@02700000 {
        compatible = "ti,k2g-edma3-tpcc", "ti,edma3-tpcc";
        reg =    <0x02700000 0x8000>;
        reg-names = "edma3_cc";
        interrupts = <GIC_SPI 200 IRQ_TYPE_EDGE_RISING>,
                <GIC_SPI 216 IRQ_TYPE_EDGE_RISING>,
                <GIC_SPI 217 IRQ_TYPE_EDGE_RISING>;
        interrupt-names = "edma3_ccint", "emda3_mperr",
                  "edma3_ccerrint";
        dma-requests = <64>;
        #dma-cells = <2>;

        ti,tptcs = <&edma0_tptc0 7>, <&edma0_tptc1 0>;

        ti,edma-memcpy-channels = <32 33 34 35>;

        power-domains = <&k2g_pds 0x3f>;
    };

    edma0_tptc0: tptc@02760000 {
        compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
        reg =    <0x02760000 0x400>;
        power-domains = <&k2g_pds 0x3f>;
    };

    edma0_tptc1: tptc@02768000 {
        compatible = "ti,k2g-edma3-tptc", "ti,edma3-tptc";
        reg =    <0x02768000 0x400>;
        power-domains = <&k2g_pds 0x3f>;
    };

    which I presume takes the same place as

    uio_edma3: edma3 {
        compatible = "ti,uio-module-drv";
        mem = <0x02700000 0x000C0000>;
    }

    from keystone-uio.dtsi, based on the memory map.


    - Where can I determine which IRQ numbers I should be using for this EDMA?
    - Is the "power-domains" property necessary? According to Documentation/devicetree/bindings/dma/ti-edma.txt, it is for the k2g, but I don't the property being used elsewhere in any of the K2H DTS files so I suppose it can be omitted?

    For the time being, I'm satisfied with using the dmatest tool.

  • Hi, j e,

    All information are in the TRM. Please download it from 

    http://www.ti.com/product/66AK2H14

    The interrupt numbers are listed in the interrupt chapter, and power domain is in the Electrical Specification chapter. 

    You can also look at the K2G TRM to see how they are defined in TRM and reflected in the dts. The same applies to K2H.

    Rex