hansemro / kc1-linux

Documentation of mainline Linux on First Generation Kindle Fire
GNU General Public License v2.0
4 stars 0 forks source link

Add remoteproc support to device tree #38

Open hansemro opened 3 years ago

hansemro commented 3 years ago

Resources:

Relevant hardware:

Relevant kernel config options:

On downstream kernels, Ducati firmware gets loaded from /lib/firmware/ducati-m3.512MB.bin. I am unsure if this firmware blob includes firmware for DSP and IPU processors.

arch/arm/boot/dts/omap4-kc1.dts:

\ {
    ...
    reserved-memory {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;
        ...
        dsp_memory_region: dsp-memory@98000000 {
            compatible = "shared-dma-pool";
            reg = <0x98000000 0x800000>;
            reusable;
            status = "okay";
        };

        ipu_memory_region: ipu-memory@98800000 {
            compatible = "shared-dma-pool";
            reg = <0x98800000 0x7000000>;
            reusable;
            status = "okay";
        };
    };
    ...
};
...
&dsp {
    status = "okay";
    memory-region = <&dsp_memory_region>;
    ti,timers = <&timer5>;
    ti,watchdog-timers = <&timer6>;
};

&ipu {
    status = "okay";
    memory-region = <&ipu_memory_region>;
    ti,timers = <&timer3>;
    ti,watchdog-timers = <&timer9>, <&timer11>;
};
hansemro commented 3 years ago
5.12.0 dmesg
[    0.000000] OF: reserved mem: initialized node dsp-memory@98000000, compatible id shared-dma-pool
[    0.000000] OF: reserved mem: initialized node ipu-memory@98800000, compatible id shared-dma-pool
[    5.005432] platform 44000000.ocp:dsp: Adding to iommu group 0
[    9.287597] platform 55020000.ipu: Adding to iommu group 1
[    9.513244] omap-rproc 44000000.ocp:dsp: assigned reserved memory node dsp-memory@98000000
[    9.522674] remoteproc remoteproc0: 44000000.ocp:dsp is available
[    9.536682] omap-rproc 55020000.ipu: assigned reserved memory node ipu-memory@98800000
[    9.550506] remoteproc remoteproc1: 55020000.ipu is available
[    9.602630] remoteproc remoteproc0: Direct firmware load for omap4-dsp-fw.xe64T failed with error -2
[    9.615234] remoteproc remoteproc0: powering up 44000000.ocp:dsp
[    9.633605] remoteproc remoteproc0: Direct firmware load for omap4-dsp-fw.xe64T failed with error -2
[    9.670379] remoteproc remoteproc1: Direct firmware load for omap4-ipu-fw.xem3 failed with error -2
[    9.683807] remoteproc remoteproc1: powering up 55020000.ipu
[    9.984191] remoteproc remoteproc1: Direct firmware load for omap4-ipu-fw.xem3 failed with error -2
mj-sakellaropoulos commented 3 years ago

Out of curiosity, does this allow for hardware video decode? If not, what does it do?

hansemro commented 3 years ago

I think so. https://en.wikipedia.org/wiki/Distributed_Codec_Engine https://web.archive.org/web/20140604122529/http://omappedia.org/wiki/Ducati_For_Dummies

mj-sakellaropoulos commented 3 years ago

Afaik it needs custom gstreamer plugin and custom firmware for ducati