Re: [PATCH v2 1/2] dt-bindings: net: can: convert grcan to DT schema
From: Rob Herring (Arm)
Date: Thu Oct 01 2026 - 15:48:34 EST
On Tue, 29 Sep 2026 15:37:02 +0800, Quchaosheng wrote:
> grcan.txt is the only CAN controller binding whose device does not have a
> compatible string. There are no device tree source files for LEON SPARC,
> and the nodes are built by the PROM from the AMBA plug&play information,
> which carries a core name and a register window but no compatible. The
> driver matches on the node name instead.
>
> It is the last of the five CAN controller bindings that were still written
> as free-form text; the other four are posted separately.
>
> A binding without a compatible string is not selected by dtbs_check,
> because nodes are matched through their compatible values. The schema
> therefore needs an explicit select on the node name. This is the same
> mechanism ethernet-phy.yaml uses for optional-compatible nodes, and
> without it the schema would never be applied to anything.
>
> Two further details are worth pointing out, because the text binding got
> them wrong or left them implicit:
>
> - "systemid" is not a property of the controller node. The driver and
> arch/sparc/kernel/leon_kernel.c both read it from the "/ambapp0" node,
> so it is described in the description rather than in properties. The
> binding is stricter than the text file here, and dtbs_check now
> rejects a controller node that carries it.
>
> - The node name format is "<core name>@<irq>,<address>", as built by
> ambapp_path_component() in arch/sparc/kernel/prom_32.c from the "name"
> and "reg" properties of the AMBA plug&play core. The select pattern
> and the example follow that format.
>
> The "name" property of the text binding is not described: dtc enforces
> that it equals the base node name and then deletes it from the output, so
> it never reaches a compiled devicetree.
>
> This binding does not reference can-controller.yaml, unlike the other CAN
> controller schemas. That common schema constrains the node name to
> "^can(@.*)?$", which these nodes cannot satisfy -- they are named after
> the AMBA plug&play core. Referencing it makes every valid node fail.
>
> No functional change. The driver comment is updated by a separate patch.
>
> Assisted-by: LLM
> Signed-off-by: Quchaosheng <quchaosheng000406@xxxxxxx>
>
> ---
> .../bindings/net/can/aeroflexgaisler,grcan.yaml | 65 ++++++++++++++++++++++
> .../devicetree/bindings/net/can/grcan.txt | 28 ----------
> 2 files changed, 65 insertions(+), 28 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
However, is this a platform you actually care about? Sparc is not
something anyone runs dtschema validation on, so not all that important
to worry about. Only someone with access to a system can actually run
the validation anyways.
The priority is fixing the remaining warnings on arm64 (about 200 left),
arm32, mips, powerpc, arc in that order of priority. I don't know that
anyone cares about mips, powerpc, or arc warnings either.
Rob