Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mikhail Kshevetskiy" <mikhail.kshevetskiy@iopsys.eu>
Cc: devicetree@vger.kernel.org, conor+dt@kernel.org, robh@kernel.org
Subject: Re: [PATCH v8 33/35] dt-bindings: pinctrl: airoha: add support of en7523 pin controller
Date: Mon, 27 Jul 2026 18:20:24 +0000	[thread overview]
Message-ID: <20260727182024.C566C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727174141.664933-34-mikhail.kshevetskiy@iopsys.eu>

Thank you for your contribution! Sashiko AI review found 6 potential issue(s) to consider:
- [High] The `gpio-ranges` property is functionally required by the driver but is missing from the `required` list in the binding schema.
- [Medium] The `groups` property incorrectly uses `enum` instead of `items: { enum: ... }` for multi-pin functions like `pwm`, `pon`, `mdio`, and `phy*_led*`.
- [Medium] The `airoha,chip-scu` phandle property is utilized by the driver code but is not documented in the schema.
- [Medium] The schema uses `additionalProperties: false` while also importing standard definitions via `$ref: pinctrl.yaml#`.
- [Low] The 'drive-strength' description erroneously uses Xilinx 'MIO' terminology.
- [Low] The example uses a deprecated integer syntax for the 'drive-open-drain' boolean property.
--

--- Patch [33]: [PATCH v8 33/35] dt-bindings: pinctrl: airoha: add support of en7523 pin controller ---
commit 4bab62ab4565097d36cb334e8d39b5c03b4424c9
Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>

dt-bindings: pinctrl: airoha: add support of en7523 pin controller

This patch adds device tree binding schema for Airoha EN7523 SoC pin
controller.

> diff --git a/Documentation/devicetree/bindings/pinctrl/airoha,en7523-pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/airoha,en7523-pinctrl.yaml
> new file mode 100644
> index 0000000000000..db8e39af1a152
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/pinctrl/airoha,en7523-pinctrl.yaml
> @@ -0,0 +1,375 @@
> +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/pinctrl/airoha,en7523-pinctrl.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Airoha EN7523 Pin Controller
> +
> +maintainers:
> +  - Lorenzo Bianconi <lorenzo@kernel.org>
> +
> +description:
> +  The Airoha's EN7523 Pin controller is used to control SoC pins.
> +
> +properties:
> +  compatible:
> +    const: airoha,en7523-pinctrl
> +
> +  interrupts:
> +    maxItems: 1

[Severity: Medium]
Should the airoha,chip-scu phandle property be documented in this schema?

The driver code in airoha_pinctrl_probe() appears to resolve a system
controller regmap using syscon_regmap_lookup_by_phandle() with this property.
Since additionalProperties is set to false, would users who provide this
optional phandle encounter a schema validation error?

[ ... ]

> +allOf:
> +  - $ref: pinctrl.yaml#
> +
> +required:
> +  - compatible
> +  - interrupts
> +  - gpio-controller
> +  - "#gpio-cells"
> +  - interrupt-controller
> +  - "#interrupt-cells"

[Severity: High]
Does this list need to require the gpio-ranges property?

The driver's airoha_convert_pin_to_reg_offset() relies on
pinctrl_find_gpio_range_from_pin_nolock(). If gpio-ranges is omitted in the
device tree, wouldn't this cause internal callbacks like
airoha_pinmux_set_direction() to fail unconditionally with -EINVAL, even
though the schema validation would pass?

[ ... ]

> +        allOf:
> +          - if:
> +              properties:
> +                function:
> +                  const: pon
> +            then:
> +              properties:
> +                groups:
> +                  enum: [pon]

[ ... ]

> +          - if:
> +              properties:
> +                function:
> +                  const: pwm
> +            then:
> +              properties:
> +                groups:
> +                  enum: [gpio0, gpio1, gpio2, gpio3, gpio4, gpio5, gpio6,
> +                         gpio7, gpio8, gpio9, gpio10, gpio11, gpio12, gpio13,
> +                         gpio14, gpio15, gpio16, gpio17, gpio18, gpio19,
> +                         gpio20, gpio21, gpio22, gpio23, gpio24, gpio25,
> +                         gpio26, gpio27, gpio28, gpio29]

[Severity: Medium]
Should the groups constraints for pon, pwm, mdio, and phy*_led* functions
be defined using items: { enum: [...] } instead of directly using enum?

The groups property implicitly inherits string-array from pinmux-node.yaml.
Applying enum directly to an array requires the entire array instance to
equal one of the literal string values, which will always evaluate to false.

Using items: { enum: [...] } (as is done for uart and spi) would correctly
validate the elements of the array and allow valid device trees to multiplex
multiple pin groups in a single node.

[ ... ]

> +          drive-strength:
> +            description:
> +              Selects the drive strength for MIO pins, in mA.
> +            enum: [2, 4, 6, 8]

[Severity: Low]
Is the reference to "MIO pins" accurate for this SoC?

This terminology is typically associated with Xilinx ZynqMP bindings, while
the Airoha EN7523 uses standard GPIO pins.

[ ... ]

> +    additionalProperties: false
> +
> +additionalProperties: false
> +
> +examples:

[Severity: Medium]
Should this use unevaluatedProperties: false instead?

Since this schema imports standard properties via allOf: - $ref: pinctrl.yaml#,
using additionalProperties: false will improperly reject standard properties
like pinctrl-0 or pinctrl-names if they are used on this device node.

> +  - |
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
> +
> +    pinctrl {
> +      compatible = "airoha,en7523-pinctrl";
> +
> +      interrupt-parent = <&gic>;
> +      interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
> +
> +      gpio-controller;
> +      #gpio-cells = <2>;
> +
> +      interrupt-controller;
> +      #interrupt-cells = <2>;
> +
> +      pcie1-rst-pins {
> +        conf {
> +          pins = "pcie_reset1";
> +          drive-open-drain = <1>;
> +        };
> +      };

[Severity: Low]
Is it possible to use the modern boolean syntax for drive-open-drain here?

The core pincfg-node.yaml schema marks the integer assignment form as
deprecated, preferring just the boolean property form (drive-open-drain;) to
avoid dt_binding_check validation warnings.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260727174141.664933-1-mikhail.kshevetskiy@iopsys.eu?part=33

  reply	other threads:[~2026-07-27 18:20 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-27 17:41 [PATCH v8 00/35] pinctrl: airoha: split on shared and SoC drivers, add more SoCs Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 01/35] dt-bindings: pinctrl: airoha: en7581: fix misprint in i2s function name Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 02/35] dt-bindings: pinctrl: airoha: en7581: fix pwm pin-groups Mikhail Kshevetskiy
2026-07-27 17:53   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 03/35] dt-bindings: pinctrl: airoha: an7583: fix device tree binding schema Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 04/35] pinctrl: airoha: fix mdio bitfield names Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 05/35] pinctrl: airoha: an7581: fix pinconf of i2c_scl/i2c_sda pins Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 06/35] pinctrl: airoha: an7583: fix I2C0_SDA_PD register bit order Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 07/35] pinctrl: airoha: an7583: there are no muxes to enable i2c buses Mikhail Kshevetskiy
2026-07-27 17:52   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 08/35] dt-bindings: pinctrl: airoha: an7583: remove i2c pin function Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 09/35] pinctrl: airoha: an7581: fix mux/conf of pcie_reset pins Mikhail Kshevetskiy
2026-07-27 17:55   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 10/35] dt-bindings: pinctrl: airoha: en7581: allow configuration of pcie_reset pins as gpio or pwm Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 11/35] pinctrl: airoha: an7583: fix muxing of non-gpio default pins Mikhail Kshevetskiy
2026-07-27 18:00   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 12/35] dt-bindings: pinctrl: airoha: an7583: allow configuration of non-gpio default pins as gpio and pwm Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 13/35] pinctrl: airoha: add missed get_direction() function for gpio_chip Mikhail Kshevetskiy
2026-07-27 18:04   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 14/35] pinctrl: airoha: add set_direction() helper " Mikhail Kshevetskiy
2026-07-27 18:09   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 15/35] pinctrl: airoha: fix getting gpiochip/pinctrl pointers in the IRQ handling code Mikhail Kshevetskiy
2026-07-27 17:56   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 16/35] pinctrl: airoha: fix IRQ mask/unmask code Mikhail Kshevetskiy
2026-07-27 18:15   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 17/35] pinctrl: airoha: add missed IRQ resource helpers Mikhail Kshevetskiy
2026-07-27 18:10   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 18/35] pinctrl: airoha: fix edge-triggered interrupts handling Mikhail Kshevetskiy
2026-07-27 18:03   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 19/35] pinctrl: airoha: remove not needed irq_type[] array Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 20/35] pinctrl: airoha: move common definitions to the separate header Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 21/35] pinctrl: airoha: split driver on shared code and SoC specific drivers Mikhail Kshevetskiy
2026-07-27 18:09   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 22/35] pinctrl: airoha: an7581: remove en7581 prefix from variable names Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 23/35] pinctrl: airoha: an7583: remove an7583 prefix from variable names and definitions Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 24/35] pinctrl: airoha: an7583: rename registers to match its an7583 names Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 25/35] pinctrl: airoha: an7583: add support for npu_uart pinmux Mikhail Kshevetskiy
2026-07-27 18:07   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 26/35] dt-bindings: pinctrl: airoha: an7583: add npu_uart pin group Mikhail Kshevetskiy
2026-07-27 17:41 ` [PATCH v8 27/35] pinctrl: airoha: an7583: add support for pon_alt pinmux Mikhail Kshevetskiy
2026-07-27 18:10   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 28/35] dt-bindings: pinctrl: airoha: an7583: add pon_alt pin group Mikhail Kshevetskiy
2026-07-27 20:14   ` Krzysztof Kozlowski
2026-07-27 17:41 ` [PATCH v8 29/35] pinctrl: airoha: an7583: add support for olt pinmux Mikhail Kshevetskiy
2026-07-27 18:11   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 30/35] dt-bindings: pinctrl: airoha: an7583: add olt function/group Mikhail Kshevetskiy
2026-07-27 20:15   ` Krzysztof Kozlowski
2026-07-27 17:41 ` [PATCH v8 31/35] pinctrl: airoha: add support of en7523 SoC Mikhail Kshevetskiy
2026-07-27 18:15   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 32/35] pinctrl: airoha: try to find chip scu node by phandle first Mikhail Kshevetskiy
2026-07-27 18:11   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 33/35] dt-bindings: pinctrl: airoha: add support of en7523 pin controller Mikhail Kshevetskiy
2026-07-27 18:20   ` sashiko-bot [this message]
2026-07-27 17:41 ` [PATCH v8 34/35] pinctrl: airoha: add support of an7563 SoC Mikhail Kshevetskiy
2026-07-27 18:16   ` sashiko-bot
2026-07-27 17:41 ` [PATCH v8 35/35] dt-bindings: pinctrl: airoha: add support of an7563 pin controller Mikhail Kshevetskiy
2026-07-27 20:12 ` [PATCH v8 00/35] pinctrl: airoha: split on shared and SoC drivers, add more SoCs Krzysztof Kozlowski

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=20260727182024.C566C1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mikhail.kshevetskiy@iopsys.eu \
    --cc=robh@kernel.org \
    --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