Re: [RFC PATCH v2 03/15] dt-bindings: misc: Add Arm Core Local Accelerator

From: Linus Walleij

Date: Sat Nov 21 2026 - 18:45:57 EST


Hi Ryan,

thanks for your patch!

The following review comments are based on my limited understanding
of device tree, the actual maintainers should have the final word
and need to look at it too.

On Thu, Oct 15, 2026 at 4:26 PM Ryan Roberts <ryan.roberts@xxxxxxx> wrote:

> Arm Core Local Accelerator (CLA) provides a CPU-local interface to
> accelerators that access memory through the local CPU's MMU. CLAs whose
> accelerators cannot be isolated from each other form an isolation
> domain.
>
> Add a binding for arm,cla describing the register range, CPU
> association, DMA coherency and isolation domain. Document the
> privilege-level register frames, including reduced ranges exposed to
> virtual machines, and provide an example of two CLAs sharing a domain.
>
> Signed-off-by: Ryan Roberts <ryan.roberts@xxxxxxx>

> .../devicetree/bindings/misc/arm,cla.yaml | 77 +++++++++++++++++++

No matter where the driver goes, this binding should (IMO)
be in

Documentation/devicetree/bindings/arm/arm,core-local-accelerator.yaml

> +properties:
> + compatible:
> + const: arm,cla

I would spell it out arm,core-local-accelerator but others may like
the terse acronym. I just think it's too short to be unique and
find Documentation | grep core is good to match for one.

> + reg:
> + maxItems: 1
> + description:
> + A single contiguous register range starting at the PL0 frame, aligned to
> + 256 KiB. Each privilege-level frame occupies 64 KiB, with PL0, PL1, PL2
> + and PL3 at offsets 0, 0x10000, 0x20000 and 0x30000 respectively.

So these registers only exist on each node (mention that here), is this address
in the *physical memory* address of *that* CPU or of the entire system
or what is it?

I'm just confused so looking for this to be explained here.

My guesswork is that each CPU has a slice of the physical memory
in this reg, and that slice is then only visible from that one CPU.
If it's like that, spell it out.

> + cpu:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description:
> + Phandle to the CPU for which this CLA is local. Only that CPU can access
> + the CLA's registers.

If this thing/address is local to the CPU, shouldn't this just be subnode
inside of the CPU device tree node itself? I'm not sure so I'm asking.

> + dma-coherent: true

Yeah, I guess ... on THAT CPU then?

I think this property is "as seen from the CPU", and assumes all CPUs
and IIUC the other CPUs cannot even see it so that doesn't sound very
coherent.

I'm just confused by this property being present here, but it's
true, in a way, I guess? Do you have to specify it?

> + arm,domain:

Domain is a bit generic don't you think? We have power domains
and clock domains already.

At least use arm,cla-domain?

> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Identifier of the CLA isolation domain. CLAs whose attached accelerators
> + cannot be isolated from each other, for example because they share an
> + inter-accelerator communication bus, must have the same domain ID.
> + Different isolation domains must have different IDs. IDs need not be
> + consecutive. A CLA that can be isolated from all other CLAs has its own
> + domain ID.

This doesn't explain what it means to isolate a domain, what
isolation even means in this context.

I know about isolating network interfaces for example: it means
to physically decouple it.

So express what "isolation" means here.

> +examples:
> + - |
> + /* Two CPU-local CLAs in the same isolation domain. */
> + cla@10000000 {
> + compatible = "arm,cla";
> + reg = <0x10000000 0x40000>;
> + cpu = <&cpu0>;
> + dma-coherent;
> + arm,domain = <0>;
> + };
> +
> + cla@10040000 {
> + compatible = "arm,cla";
> + reg = <0x10040000 0x40000>;
> + cpu = <&cpu1>;
> + dma-coherent;
> + arm,domain = <0>;
> + };

This example makes it look like these CLAs are all uniquely
mapped into the (shared) physical address space. Is it so?

Yours,
Linus Walleij