diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 87 |
1 files changed, 47 insertions, 40 deletions
@@ -96,6 +96,12 @@ modified to insert an Ethos-U subsystem in one of the M-class slots. Mailbox communication is based on the Arm MHU v2, and the reset is controlled using a IO mapped bridge. +## ethosu + +The `ethosu` device represents the Ethos-U subsystem and contains a +`dma-ranges` entry that specifies how to translate between the Linux kernel +physical addresses and bus (Cortex-M) addresses. + ## ethosu-rproc The [Ethos-U remoteproc driver](remoteproc/ethosu_remoteproc.c) is used to load @@ -111,20 +117,17 @@ The `memory-region` entry references the shared memory pool. This is the memory region used to allocate DMA buffers for the virtio rpmsg message queues and other memory resources. -The `ethosu,dma-ranges` is specific to the Ethos-U remoteproc driver, and is -used to translate Linux physical addresses into DMA addresses. The reason for -not using `dma-range` directly is that `dma-ranges` is not fully supported by -the -[virtio_ring.c](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/virtio/virtio_ring.c) -kernel driver. Buffers sent to the firmware will contain Linux physical -addresses instead of DMA addresses. - The `reset` entry is referencing the driver used to control reset for the subsystem. The `mboxes` entry is referencing the MHU v2 driver used for mailbox communication. +Note `dma-ranges` is not fully supported by the +[virtio_ring.c](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/virtio/virtio_ring.c) +kernel driver. Therefore, buffers sent to the firmware will contain Linux +physical addresses instead of DMA addresses. + ## Corstone-1000 DTB ``` @@ -169,38 +172,42 @@ communication. reg-names = "rstreg", "streg"; }; - /* - compatible : "arm,ethosu-rproc" - * - reg : Memory regions reserved for firmware binary - * - ethosu,dma-ranges : Address translation from bus address (Cortex-M) - * to Linux kernel physical address - * - bus address (#address-cells) - * - physical address (#address-cells) - * - size (#size-cells) - * - memory-region : Memory region for allocation of DMA buffers - * - mboxes : Mailbox driver used to raise interrupts on - * remote CPU - * - resets : Reset driver used to reset remote CPU - */ - ethosu-rproc { - compatible = "arm,ethosu-rproc"; - - // Address mapping from DMA to physical - ethosu,dma-ranges = <0x00000000 0x44000000 0x00200000>, - <0x60000000 0x80000000 0x10000000>; - - reg = <0x44000000 0x00200000>, - <0x84000000 0x01000000>; - reg-names = "rom", "shared"; - - // Memory region to allocate buffers from - memory-region = <&rproc_reserved>; - - // Mailbox IRQ communication - mboxes = <&mbox_es0mhu0 0>, <&mbox_es0mhu0 0>; - mbox-names = "tx", "rx"; - - // Reset handler - resets = <&cs1k_rst_es0 0>; + + ethosu { + #address-cells = <1>; + #size-cells = <1>; + compatible = "simple-bus"; + ranges; + + // Address mapping from bus address (Cortex-M) to Linux kernel physical address + dma-ranges = <0x00000000 0x44000000 0x00200000>, + <0x60000000 0x80000000 0x10000000>; + + + /* - compatible : "arm,ethosu-rproc" + * - reg : Memory regions reserved for firmware binary + * - memory-region : Memory region for allocation of DMA buffers + * - mboxes : Mailbox driver used to raise interrupts on + * remote CPU + * - resets : Reset driver used to reset remote CPU + */ + ethosu-rproc { + compatible = "arm,ethosu-rproc"; + + reg = <0x44000000 0x00200000>, + <0x84000000 0x01000000>; + reg-names = "rom", "shared"; + + // Memory region to allocate buffers from + memory-region = <&rproc_reserved>; + + // Mailbox IRQ communication + mboxes = <&mbox_es0mhu0 0>, <&mbox_es0mhu0 0>; + mbox-names = "tx", "rx"; + + // Reset handler + resets = <&cs1k_rst_es0 0>; + }; }; }; ``` |