From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCHv2] dt-bindings: pinctrl: convert nsp-gpio binding
Date: Thu, 24 Sep 2026 23:43:17 +0000 [thread overview]
Message-ID: <20260924234317.DD8EB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924233541.126868-1-rosenp@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] dt-bindings: validation failure due to top-level additionalProperties restricting scalar properties
- [Medium] dt-bindings: missing constraint in nsp-gpio-pinconf bypasses typo validation
--
commit 7f4d084d5f13cdd135dd4287165b9406e5c21963
Author: Rosen Penev <rosenp@gmail.com>
dt-bindings: pinctrl: convert nsp-gpio binding
The brcm,nsp-gpio-a compatible used by the NSP GPIO controller was only
documented in the legacy text binding, so dtbs_check reported "failed to
match any schema" for the gpio@20 node present in the bcm958625 and
related broadcom boards.
> diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.yaml
> new file mode 100644
> index 0000000000000..d7f9a1eb3b93d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/brcm,nsp-gpio.yaml
[ ... ]
> +$defs:
> + nsp-gpio-pinconf:
> + type: object
> + allOf:
> + - $ref: pincfg-node.yaml#
> + - $ref: pinmux-node.yaml#
[Severity: Medium]
Will this allow misspelled or unsupported properties inside pin configuration
child nodes to pass validation?
Because neither additionalProperties: false nor unevaluatedProperties: false
is specified in this definition, the object schema relies on default JSON
schema behavior, which permits arbitrary undefined properties. Properties like
bias-pullup (typo) or slew-rate (unsupported) will pass dtbs_check
without warning.
[ ... ]
> +additionalProperties:
> + $ref: '#/$defs/nsp-gpio-pinconf'
[Severity: High]
Does this inappropriately apply pinconf constraints to all unmatched top-level
properties?
In JSON Schema, this forces all properties not explicitly listed in the
properties block to conform to $defs/nsp-gpio-pinconf. Since that reference
enforces type: object and requires a pins property, scalar or array
properties will unconditionally fail.
Device trees utilizing this controller and standard generic properties (like
pinctrl-names or implicit ones like phandle) will fail schema validation.
[ ... ]
> +examples:
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + gpio@18000020 {
> + compatible = "brcm,nsp-gpio-a";
> + reg = <0x18000020 0x100>,
> + <0x1803f1c4 0x1c>;
> + #gpio-cells = <2>;
> + gpio-controller;
> + ngpios = <32>;
> + gpio-ranges = <&pinctrl 0 0 31>;
> + interrupt-controller;
> + #interrupt-cells = <2>;
> + interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH>;
> +
> + /* Pin configuration node applied as a pinctrl state */
> + pinctrl-names = "default";
> + pinctrl-0 = <&led>;
[Severity: High]
Will these standard properties in the example fail validation?
Because of the additionalProperties directive restricting scalar properties,
pinctrl-names and pinctrl-0 will fail validation because they are not
objects and lack a pins property.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260924233541.126868-1-rosenp@gmail.com?part=1
prev parent reply other threads:[~2026-09-24 23:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 23:35 [PATCHv2] dt-bindings: pinctrl: convert nsp-gpio binding Rosen Penev
2026-09-24 23: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=20260924234317.DD8EB1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=rosenp@gmail.com \
--cc=sashiko-reviews@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