Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arun Muthusamy" <arun.muthusamy@gaisler.com>
Cc: conor+dt@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v7 02/15] dt-bindings: net: can: gaisler,grcan: Convert to DT schema
Date: Fri, 08 May 2026 18:37:54 +0000	[thread overview]
Message-ID: <20260508183755.2C191C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260508070121.6918-3-arun.muthusamy@gaisler.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
- [Medium] The `gaisler,grhcan` compatible string is missing from the schema.
- [Medium] Incomplete schema validation for required clock properties.
- [Low] Unused header inclusion in the device tree example.
--

commit e39872eda9f93cf639be07e78cd2690d6ce06614
Author: Arun Muthusamy <arun.muthusamy@gaisler.com>

dt-bindings: net: can: gaisler,grcan: Convert to DT schema

This commit converts the device tree bindings for Gaisler GRCAN, GRHCAN,
and GRCANFD CAN controllers from a text format to YAML format. It removes
the stale systemid property, makes freq optional, adds clocks, and provides
an example.

> diff --git a/Documentation/devicetree/bindings/net/can/gaisler,grcan.yaml b/Documentation/devicetree/bindings/net/can/gaisler,grcan.yaml
> new file mode 100644
> index 0000000000000..8fea97c7319ad
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/can/gaisler,grcan.yaml
> @@ -0,0 +1,62 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/net/can/gaisler,grcan.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#

[ ... ]

> +properties:
> +  compatible:
> +    enum:
> +      - gaisler,grcan
> +      - gaisler,grcanfd

The commit message, title, and description explicitly state that the binding
supports the GRHCAN CAN controller, and the original text binding also
documented support for it. 

Does this enum unintentionally omit "gaisler,grhcan"? Without it, device
trees specifying the GRHCAN hardware variant might fail schema validation.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clocks:
> +    maxItems: 1
> +
> +  freq:
> +    $ref: /schemas/types.yaml#/definitions/uint32

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +

The original text binding required the freq property for the CAN controller
to operate. The new schema makes freq optional and introduces clocks, but
neither is required here. 

Should the schema enforce that at least one clock source is provided using an
anyOf constraint, to prevent device trees lacking clock definitions from
silently passing validation?

> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +
> +    can@ff400000 {
> +        compatible = "gaisler,grcanfd";
> +        clocks = <&sysclock>;
> +        reg = <0xff400000 0x400>;
> +        interrupt-parent = <&plic0>;
> +        interrupts = <6>;
> +    };

This isn't a bug, but the example includes irq.h while the interrupts
property is assigned a raw integer <6>. Is this include necessary here?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260508070121.6918-1-arun.muthusamy@gaisler.com?part=2

  reply	other threads:[~2026-05-08 18:37 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-08  7:01 [PATCH v7 RESEND 00/15] can: grcan: Enhance driver with CANFD Support and Improvements Arun Muthusamy
2026-05-08  7:01 ` [PATCH v7 01/15] dt-bindings: Add vendor prefix for Frontgrade Gaisler AB Arun Muthusamy
2026-05-08  7:01 ` [PATCH v7 02/15] dt-bindings: net: can: gaisler,grcan: Convert to DT schema Arun Muthusamy
2026-05-08 18:37   ` sashiko-bot [this message]
2026-05-08  7:01 ` [PATCH v7 03/15] MAINTAINERS: Add maintainers for GRCAN CAN network driver Arun Muthusamy
2026-05-08  7:01 ` [PATCH v7 04/15] can: grcan: Add clock handling Arun Muthusamy
2026-05-08 18:50   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 05/15] can: grcan: Replace bit timing macros with literal values Arun Muthusamy
2026-05-08  7:01 ` [PATCH v7 06/15] can: grcan: Simplify timing configuration Arun Muthusamy
2026-05-08 19:28   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 07/15] can: grcan: add FD capability detection and nominal bit-timing Arun Muthusamy
2026-05-08 19:45   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 08/15] can: grcan: set DMA mask for GRCAN and GRCANFD to 32-bit Arun Muthusamy
2026-05-08 19:53   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 09/15] can: grcan: Add saving and restoring of CAN FD baud-rate registers Arun Muthusamy
2026-05-08 21:35   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 10/15] can: grcan: Reserve space between cap and next register to align with address layout Arun Muthusamy
2026-05-08  7:01 ` [PATCH v7 11/15] can: grcan: Refactor GRCAN DMA buffer to use structured memory layout Arun Muthusamy
2026-05-08 22:03   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 12/15] can: grcan: Add CANFD TX support alongside legacy CAN Arun Muthusamy
2026-05-08 22:40   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 13/15] can: grcan: Add CANFD RX " Arun Muthusamy
2026-05-08 23:08   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 14/15] can: grcan: Update echo skb handling to match variable length CANFD frame Arun Muthusamy
2026-05-08 23:25   ` sashiko-bot
2026-05-08  7:01 ` [PATCH v7 15/15] can: grcan: Advertise CANFD capability Arun Muthusamy
2026-05-08 23:50   ` sashiko-bot

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=20260508183755.2C191C2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=arun.muthusamy@gaisler.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko@lists.linux.dev \
    /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