Re: [PATCH v13 4/5] dt-bindings: riscv: Add binding for CBQRI controllers

From: Drew Fustini

Date: Thu Dec 03 2026 - 16:57:23 EST


On Thu, Dec 03, 2026 at 10:14:27AM +0000, sashiko-bot@xxxxxxxxxx wrote:
> Thank you for your contribution! Sashiko AI review found 3 potential
> issues to consider:
> - [Low] dt-bindings: riscv: redundant word binding in commit subject
> - [Low] dt-bindings: riscv: unrelated l2-cache node in binding examples
> - [Low] dt-bindings: riscv: riscv,cbqri omits else disallowing
> riscv,cbqri-cache
> --
>
> commit 63d52e4c1ccf2d770236b537053128d71ffee89a
> Author: Drew Fustini <fustini@xxxxxxxxxx>
>
> dt-bindings: riscv: Add binding for CBQRI controllers
>
> This commit adds the Device Tree binding schema for RISC-V CBQRI
> capacity and bandwidth controllers and registers it in MAINTAINERS.
>
> > dt-bindings: riscv: Add binding for CBQRI controllers
>
> [Severity: Low]
> The dt-bindings: prefix already states that this patch adds a binding,
> so Documentation/devicetree/bindings/submitting-patches.rst recommends
> avoiding the redundant word "binding" in the subject (for example,
> "dt-bindings: riscv: Add CBQRI controllers").

It already had DT maintainer Rb but Rob raises good points about the
schema so I will change the subject for v14.

> > diff --git a/Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml b/Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml
> > new file mode 100644
> > index 0000000000000..160b0bc797b18
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/riscv/riscv,cbqri.yaml
>
> [ ... ]
>
> > + riscv,cbqri-cache:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + Phandle to the cache node whose capacity this controller allocates.
> > + Applies to capacity controllers that back a CPU cache. The cache level
> > + and the harts sharing it are taken from that node's cache topology.
> > +
> > +required:
> > + - compatible
> > + - reg
> > +
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: riscv,cbqri-capacity-controller
> > + then:
> > + required:
> > + - riscv,cbqri-rcid
> > + - riscv,cbqri-cache
>
> [Severity: Low]
> Should this allOf conditional include an else branch that sets
> riscv,cbqri-cache to false?
>
> Because riscv,cbqri-cache is declared at the top level and only applies
> to capacity controllers, a bandwidth-controller node carrying it would
> pass dtbs_check once a vendor compatible replaces the not: {}
> placeholder.

The bandwidth branch of the compatible is "not: {}" for now, so no
bandwidth controller node can validate at all with this current binding.
Anyways, Rob has raised concern that means some of this will change
anyways.

> > +examples:
> > + - |
> > + l2_cache: l2-cache {
> > + compatible = "cache";
> > + cache-level = <2>;
> > + cache-unified;
> > + cache-size = <0xc00000>;
> > + cache-sets = <8192>;
> > + cache-block-size = <64>;
> > + };
> > +
> > + qos-controller@a21a00c0 {
> > + compatible = "tenstorrent,ascalon-shared-cache-controller",
> > + "riscv,cbqri-capacity-controller";
> > + reg = <0xa21a00c0 0xf40>;
> > + riscv,cbqri-rcid = <16>;
> > + riscv,cbqri-cache = <&l2_cache>;
> > + };
>
> [Severity: Low]
> Should the l2-cache node be dropped from the example?
>
> Per Documentation/devicetree/bindings/writing-schema.rst, binding
> examples should not include unrelated nodes referenced only by phandles,
> as phandles in examples do not need to be resolvable.

I don't think this really was an issue and it already had a Rb. But
Rob's feedback means the example will change anyways.

Thanks,
Drew