From: sashiko-bot@kernel.org
To: "Yassine Oudjana" <yassine.oudjana@gmail.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 4/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller
Date: Sat, 30 May 2026 15:29:11 +0000 [thread overview]
Message-ID: <20260530152912.67F511F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260530145800.1029920-5-y.oudjana@protonmail.com>
Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:
New issues:
- [High] The documented `drive-strength` values [1, 2, 4, 16] for MT6765 include values that will cause runtime `-EINVAL` failures in the driver.
- [Medium] The schema for MT6795 conditionally allows 2 interrupts, but the top-level property restricts `interrupts` to `maxItems: 1`.
Pre-existing issues:
- [High] Pre-existing schema mismatch for MT6779 and MT6797 drive-strength values, causing identical runtime failures.
--
commit 51d39da1313cce768284322ddb8ef56f47955b24
Author: Yassine Oudjana <y.oudjana@protonmail.com>
dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller
The MT6765 pin controller has had a driver for a while, but DT
bindings were never documented for it.
> diff --git a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
> index 2124804c88631..1f65f0fd41bdf 100644
> --- a/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
> +++ b/Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
[ ... ]
> @@ -61,6 +62,41 @@ required:
>
> allOf:
> - $ref: pinctrl.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: mediatek,mt6765-pinctrl
> + then:
[ ... ]
> + patternProperties:
> + '-pins$':
> + patternProperties:
> + '^pins':
> + properties:
> + drive-strength:
> + enum: [1, 2, 4, 16]
[Severity: High]
Will the value 16 cause runtime probe failures?
Looking at the driver in pinctrl-mt6765.c, .drive_set is assigned to
mtk_pinconf_drive_set_raw(), which passes the DT argument directly to
mtk_hw_set_value() without converting it from mA to a register value.
The maximum field width for DRV fields in mt6765_pin_drv_range is 3 bits
(a bitmask of 7). Passing 16 causes mtk_hw_set_value() to reject it
with -EINVAL because 16 > 7, aborting the probe for dependent devices.
> - if:
> properties:
> compatible:
> contains:
> const: mediatek,mt6779-pinctrl
[Severity: High]
This is a pre-existing issue, but does the MT6779 (and MT6797) drive-strength
also exceed the hardware raw register bitmask?
Similar to the MT6765 issue, the MT6779 and MT6797 pinctrl drivers use
mtk_pinconf_drive_set_raw() which expects raw 3-bit register values (0-7).
However, the schema defines drive-strength enums with values representing
mA (8, 12, and 16). Using these higher values will cause mtk_hw_set_value()
to fail with -EINVAL at runtime.
[Severity: Medium]
Does the top-level interrupts constraint conflict with the MT6795 conditional
block?
The root level of the schema defines interrupts: maxItems: 1. However, the
if block for mediatek,mt6795-pinctrl conditionally provides an items array
with 2 descriptions.
Since JSON Schema evaluates constraints cumulatively via allOf, the global
maxItems: 1 takes precedence. Any MT6795 device tree providing 2 interrupts
will fail schema validation.
Could the top-level maxItems be relaxed to 2 and constrained to 1 inside
specific if blocks?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260530145800.1029920-1-y.oudjana@protonmail.com?part=4
next prev parent reply other threads:[~2026-05-30 15:29 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 14:57 [PATCH v8 0/6] MediaTek pinctrl DT binding cleanup and MT6735 pinctrl support Yassine Oudjana
2026-05-30 14:57 ` [PATCH v8 1/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Pull pinctrl node changes from MT6795 document Yassine Oudjana
2026-05-30 14:57 ` [PATCH v8 2/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Improve pinctrl subnode and property descriptions Yassine Oudjana
2026-05-30 15:09 ` sashiko-bot
2026-05-30 14:57 ` [PATCH v8 3/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Add MT6795 Yassine Oudjana
2026-05-30 15:17 ` sashiko-bot
2026-05-30 14:57 ` [PATCH v8 4/6] dt-bindings: pinctrl: mediatek,mt6779-pinctrl: Document MT6765 pin controller Yassine Oudjana
2026-05-30 15:29 ` sashiko-bot [this message]
2026-05-30 14:57 ` [PATCH v8 5/6] dt-bindings: pinctrl: mediatek: Add bindings for MT6735 " Yassine Oudjana
2026-05-30 15:35 ` sashiko-bot
2026-05-30 14:57 ` [PATCH v8 6/6] pinctrl: mediatek: Add MT6735 pinctrl driver Yassine Oudjana
2026-05-30 15:55 ` 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=20260530152912.67F511F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=yassine.oudjana@gmail.com \
/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