Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Kartik Nair" <contact.kartikn@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Subject: Re: [PATCH] dt-bindings: misc: add documentation for MediaLB DIM2 controller
Date: Mon, 11 May 2026 21:43:20 +0000	[thread overview]
Message-ID: <20260511214321.29CEAC2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260510184419.98043-1-contact.kartikn@gmail.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] The `microchip,clock-speed` property is required by the driver but omitted from the schema.
- [High] The clock properties restrict definitions to a single clock named "mediaLB_int", which is incompatible with the Freescale driver.
- [High] The `interrupts` property permits 1 interrupt, but the driver unconditionally requires 2.
- [Medium] Missing conditional constraints to enforce hardware-specific clock requirements.
--

commit ed9d7ddf4fb03364e5365e6ea5d84fa84fa267e6
Author: Kartik Nair <contact.kartikn@gmail.com>

dt-bindings: misc: add documentation for MediaLB DIM2 controller

Add device tree binding documentation for the MediaLB DIM2 hardware
dependent module. This documents the compatible strings used in
drivers/staging/most/dim2/dim2.c which were previously flagged as
undocumented by checkpatch.

> diff --git a/Documentation/devicetree/bindings/misc/microchip,most-dim2.yaml b/Documentation/devicetree/bindings/misc/microchip,most-dim2.yaml
> new file mode 100644
> index 0000000000000..213078811f820
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/misc/microchip,most-dim2.yaml

[ ... ]

> +properties:
> +  compatible:
> +    enum:
> +      - fsl,imx6q-mlb150
> +      - renesas,mlp
> +      - renesas,rcar-gen3-mlp
> +      - xlnx,axi4-os62420_3pin-1.00.a
> +      - xlnx,axi4-os62420_6pin-1.00.a

Should we add conditional constraints for the clocks property based on the
compatible string?

The Freescale and Renesas variants strictly require clocks in their driver
implementations, while Xilinx variants do not. Since clocks is omitted
from the global required list, incomplete device tree nodes for Freescale
and Renesas platforms will pass validation.

> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 1
> +    maxItems: 2

Does the driver support a single interrupt?

The driver implementation in dim2_probe() unconditionally requests two
distinct interrupts by index (index 1 and index 0). If a device tree
specifies only 1 interrupt as permitted here, the driver's attempt to
retrieve index 1 will return an error and abort the probe.

> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: mediaLB_int

Are these clock constraints compatible with the Freescale driver?

The fsl_mx6_enable() implementation explicitly requests up to two clocks by
name ("mlb" and optionally "pll8_mlb"). A device tree adhering to this
schema will provide a single clock named "mediaLB_int", causing the
Freescale driver to fail its clock lookup.

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

Is there a missing definition for the microchip,clock-speed property?

The driver dim2_probe() explicitly calls of_property_read_string() for
microchip,clock-speed and aborts if it is missing. With
additionalProperties set to false, a device tree including this required
property will fail schema validation, while one conforming strictly to the
schema will omit it and cause the driver to fail at runtime.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260510184419.98043-1-contact.kartikn@gmail.com?part=1

      parent reply	other threads:[~2026-05-11 21:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-10 18:44 [PATCH] dt-bindings: misc: add documentation for MediaLB DIM2 controller Kartik Nair
2026-05-11 16:14 ` Conor Dooley
2026-05-11 16:58   ` Greg KH
2026-05-11 21:43 ` sashiko-bot [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=20260511214321.29CEAC2BCB0@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=contact.kartikn@gmail.com \
    --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