Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mikhail Kshevetskiy" <mikhail.kshevetskiy@iopsys.eu>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 30/34] pinctrl: airoha: add support of en7523 SoC
Date: Mon, 27 Jul 2026 08:13:52 +0000	[thread overview]
Message-ID: <20260727081352.D31821F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727074234.3761170-31-mikhail.kshevetskiy@iopsys.eu>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

New issues:
- [Medium] Missing hardware configuration for dedicated non-GPIO and PCIe reset pins
- [Low] Dead code: Unused macro definitions

Pre-existing issues:
- [High] Driver probe failure due to hardcoded EN7581 syscon dependency
--

--- Patch [30]: [PATCH v7 30/34] pinctrl: airoha: add support of en7523 SoC ---
commit cb202b59244d84caae5e01de5b50036f419bfc6e
Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
Subject: pinctrl: airoha: add support of en7523 SoC

This patch adds support of Airoha en7523 SoC pin controller.

> diff --git a/drivers/pinctrl/airoha/pinctrl-en7523.c b/drivers/pinctrl/airoha/pinctrl-en7523.c
> new file mode 100644
> --- /dev/null
> +++ b/drivers/pinctrl/airoha/pinctrl-en7523.c
> @@ -0,0 +1,1124 @@

[ ... ]

> +#define REG_NPU_UART_EN				0x0220
> +#define JTAG_UDI_EN_MASK			BIT(4)
> +#define JTAG_DFD_EN_MASK			BIT(3)
> +#define NPU_UART_EN_MASK			BIT(2)
> +
> +#define REG_FORCE_GPIO_EN			0x0224
> +#define FORCE_GPIO_EN(n)			BIT(n)
> +
> +/* LED MAP */

[Severity: Low]
Are these register definitions for REG_FORCE_GPIO_EN and FORCE_GPIO_EN
utilized anywhere in this file? They seem to be defined here but never
mapped or used. Is this leftover code from another SoC driver?

[ ... ]

> +#define AIROHA_PINCTRL_GPIO(gpio, mux_val)			\
> +	{							\
> +		.name = (gpio),					\
> +		.regmap[0] = {					\
> +			AIROHA_FUNC_MUX,			\
> +			REG_GPIO_PON_MODE,			\
> +			(mux_val),				\
> +			(mux_val)				\
> +		},						\
> +		.regmap_size = 1,				\
> +	}
> +
> +#define AIROHA_PINCTRL_GPIO_EXT(gpio, mux_val, smux_val)	\

[Severity: Low]
Is the AIROHA_PINCTRL_GPIO macro needed? It appears only
AIROHA_PINCTRL_GPIO_EXT is used below in gpio_func_group.

[ ... ]

> +static const struct airoha_pinctrl_conf pinctrl_pullup_conf[] = {
> +	PINCTRL_CONF_DESC(12, REG_GPIO_L_PU, BIT(0)),
> +	PINCTRL_CONF_DESC(13, REG_GPIO_L_PU, BIT(1)),

[Severity: Medium]
Should pins 2 through 9 be included in this configuration array?

The driver defines registers and bitmasks for configuring pull-up, pull-down,
and drive strength for these dedicated I2C, SPI, and UART pins (like
REG_I2C_SDA_PU), but they appear to be entirely missing from the
pinctrl_pullup_conf, pinctrl_pulldown_conf, pinctrl_drive_e2_conf, and
pinctrl_drive_e4_conf arrays.

Will device tree properties attempting to configure these electrical
characteristics fail?

[ ... ]

> +	PINCTRL_CONF_DESC(38, REG_GPIO_L_PU, BIT(26)),
> +	PINCTRL_CONF_DESC(39, REG_GPIO_L_PU, BIT(27)),
> +	PINCTRL_CONF_DESC(40, REG_GPIO_L_PU, BIT(28)),
> +	PINCTRL_CONF_DESC(41, REG_GPIO_L_PU, BIT(29)),
> +};

[Severity: Medium]
Are pins 40 and 41 correctly mapped here?

They are mapped to REG_GPIO_L_PU bits 28 and 29, but earlier in the file
PCIE0_RESET_PU_MASK and PCIE1_RESET_PU_MASK are defined as bits 8 and 9 of
REG_I2C_SDA_PU.

Will configuring the PCIe resets write to the wrong register?

[ ... ]

> +static struct platform_driver airoha_pinctrl_driver = {
> +	.probe = airoha_pinctrl_probe,
> +	.driver = {
> +		.name = "pinctrl-airoha-en7523",
> +		.of_match_table = airoha_pinctrl_of_match,
> +	},
> +};
> +module_platform_driver(airoha_pinctrl_driver);

[Severity: High]
This is a pre-existing issue, but will this driver successfully probe on
EN7523 hardware?

The core function airoha_pinctrl_probe() appears to unconditionally look up
the system controller using syscon_regmap_lookup_by_compatible() with the
hardcoded string "airoha,en7581-chip-scu". Since the EN7523 device tree
likely uses its own compatible string, won't this lookup fail and cause the
probe function to return -ENODEV?

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

  reply	other threads:[~2026-07-27  8:13 UTC|newest]

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