[RFC PATCH 1/5] dt-bindings: dma: Add CMA Heap bindings
Maxime Ripard
mripard at kernel.org
Thu Jan 30 05:28:59 PST 2025
Hi,
On Thu, Jan 30, 2025 at 01:08:57PM +0000, Florent Tomasin wrote:
> Introduce a CMA Heap dt-binding allowing custom
> CMA heap registrations.
>
> * Note to the reviewers:
> The patch was used for the development of the protected mode
> feature in Panthor CSF kernel driver and is not initially thought
> to land in the Linux kernel. It is mostly relevant if someone
> wants to reproduce the environment of testing. Please, raise
> interest if you think the patch has value in the Linux kernel.
>
> Signed-off-by: Florent Tomasin <florent.tomasin at arm.com>
> ---
> .../devicetree/bindings/dma/linux,cma.yml | 43 +++++++++++++++++++
> 1 file changed, 43 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/dma/linux,cma.yml
>
> diff --git a/Documentation/devicetree/bindings/dma/linux,cma.yml b/Documentation/devicetree/bindings/dma/linux,cma.yml
> new file mode 100644
> index 000000000000..c532e016bbe5
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/dma/linux,cma.yml
> @@ -0,0 +1,43 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/dma/linux-cma.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Custom Linux CMA heap
> +
> +description:
> + The custom Linux CMA heap device tree node allows registering
> + of multiple CMA heaps.
> +
> + The CMA heap name will match the node name of the "memory-region".
> +
> +properties:
> + compatible:
> + enum:
> + - linux,cma
> +
> + memory-region:
> + maxItems: 1
> + description: |
> + Phandle to the reserved memory node associated with the CMA Heap.
> + The reserved memory node must follow this binding convention:
> + - Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
> +
> +examples:
> + - |
> + reserved-memory {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + custom_cma_heap: custom-cma-heap {
> + compatible = "shared-dma-pool";
> + reg = <0x0 0x90600000 0x0 0x1000000>;
> + reusable;
> + };
> + };
> +
> + device_cma_heap: device-cma-heap {
> + compatible = "linux,cma";
> + memory-region = <&custom_cma_heap>;
> + };
Isn't it redundant with the linux,cma-default shared-dma-pool property
already?
Maxime
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20250130/4ad328bd/attachment.sig>
More information about the Linux-mediatek
mailing list