Devicetree
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Quchaosheng <quchaosheng000406@163.com>
Cc: Vincent Mailhol <mailhol@kernel.org>,
	linux-kernel@vger.kernel.org,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	linux-can@vger.kernel.org,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	devicetree@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>
Subject: Re: [PATCH v2 1/2] dt-bindings: net: can: convert grcan to DT schema
Date: Thu, 1 Oct 2026 14:48:26 -0500	[thread overview]
Message-ID: <179088367401.1689772.5473897250547043702.robh@kernel.org> (raw)
In-Reply-To: <20260929073703.2748220-2-quchaosheng000406@163.com>


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@163.com>
> 
> ---
>  .../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@kernel.org>

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

      reply	other threads:[~2026-10-01 19:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  7:37 [PATCH v2 0/2] dt-bindings: net: can: grcan: convert to DT schema Quchaosheng
2026-09-29  7:37 ` [PATCH v2 1/2] dt-bindings: net: can: convert grcan " Quchaosheng
2026-10-01 19:48   ` Rob Herring (Arm) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179088367401.1689772.5473897250547043702.robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=quchaosheng000406@163.com \
    --cc=socketcan@hartkopp.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox