From: sashiko-bot@kernel.org
To: "Mikhail Kshevetskiy" <mikhail.kshevetskiy@iopsys.eu>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v9 35/36] pinctrl: airoha: add support of an7563 SoC
Date: Tue, 04 Aug 2026 16:35:53 +0000 [thread overview]
Message-ID: <20260804163554.1638A1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804160419.3592327-36-mikhail.kshevetskiy@iopsys.eu>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Missing i2c, spi, and uart configurations to clear GPIO mode bits on standalone pads.
- [Medium] Missing gpio function support for pins 0-27 prevents restoring them to GPIO mode.
--
--- Patch [35]: [PATCH v9 35/36] pinctrl: airoha: add support of an7563 SoC ---
commit 6207c71cb41f704bc923f2a3370df4d4674e76e8
Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
pinctrl: airoha: add support of an7563 SoC
This patch adds support of Airoha an7563 SoC pin controller.
> diff --git a/drivers/pinctrl/airoha/pinctrl-an7563.c b/drivers/pinctrl/airoha/pinctrl-an7563.c
> new file mode 100644
> index 0000000000000..40cbbe90cc464
> --- /dev/null
> +++ b/drivers/pinctrl/airoha/pinctrl-an7563.c
[ ... ]
> +static const char *const gpio_groups[] = {
> + "gpio28", "gpio29", "gpio30", "gpio31", "gpio32",
> + "gpio33", "gpio34", "gpio35", "gpio36", "gpio37"
> +};
[Severity: Medium]
Will this prevent restoring pins 0-27 back to GPIO mode if they were configured
for alternate functions (like PWM or PON) by the bootloader?
Since pins 0-27 are omitted from this group and gpio_func_group[], users won't
be able to explicitly request them as "gpio".
[ ... ]
> +static const struct airoha_pinctrl_func_group mdio_func_group[] = {
> + {
> + .name = "mdio",
> + .regmap[0] = {
> + AIROHA_FUNC_MUX,
> + REG_GPIO_PON_MODE,
> + GPIO_SGMII_MDIO_MODE_MASK,
> + GPIO_SGMII_MDIO_MODE_MASK
> + },
> + .regmap_size = 1,
> + },
> +};
[Severity: High]
Does this leave pins 30 and 31 stuck in GPIO mode if the bootloader previously
set I2C_SCL_GPIO_MODE_MASK or I2C_SDA_GPIO_MODE_MASK?
It looks like this function doesn't clear those GPIO mode bits when enabling
MDIO.
[ ... ]
> +static const struct airoha_pinctrl_func_group spi_func_group[] = {
> + {
> + .name = "spi_quad",
> + .regmap[0] = {
> + AIROHA_FUNC_MUX,
> + REG_GPIO_SPI_CS1_MODE,
> + GPIO_SPI_QUAD_MODE_MASK,
> + GPIO_SPI_QUAD_MODE_MASK
> + },
> + .regmap_size = 1,
> + }, {
> + .name = "spi_cs1",
> + .regmap[0] = {
> + AIROHA_FUNC_MUX,
> + REG_GPIO_SPI_CS1_MODE,
> + GPIO_SPI_CS1_MODE_MASK,
> + GPIO_SPI_CS1_MODE_MASK
> + },
> + .regmap_size = 1,
> + },
> +};
[Severity: High]
Is the "spi" group (pins 32-35) intentionally omitted here?
Without it, there appears to be no way to clear the SPI_*_GPIO_MODE_MASK bits
to restore the base SPI functionality if the bootloader configured these pins
as GPIOs.
[ ... ]
> +static const struct airoha_pinctrl_func pinctrl_funcs[] = {
> + PINCTRL_FUNC_DESC("pon", pon),
> + PINCTRL_FUNC_DESC("sipo", sipo),
> + PINCTRL_FUNC_DESC("mdio", mdio),
> + PINCTRL_FUNC_DESC("uart", uart),
> + PINCTRL_FUNC_DESC("jtag", jtag),
> + PINCTRL_FUNC_DESC("pcm", pcm),
> + PINCTRL_FUNC_DESC("spi", spi),
> + PINCTRL_FUNC_DESC("pnand", pnand),
> + PINCTRL_FUNC_DESC("gpio", gpio),
> + PINCTRL_FUNC_DESC("pcie_reset", pcie_reset),
> + PINCTRL_FUNC_DESC("pwm", pwm),
> + PINCTRL_FUNC_DESC("phy1_led0", phy1_led0),
> + PINCTRL_FUNC_DESC("phy2_led0", phy2_led0),
> + PINCTRL_FUNC_DESC("phy3_led0", phy3_led0),
> + PINCTRL_FUNC_DESC("phy4_led0", phy4_led0),
> + PINCTRL_FUNC_DESC("phy1_led1", phy1_led1),
> + PINCTRL_FUNC_DESC("phy2_led1", phy2_led1),
> + PINCTRL_FUNC_DESC("phy3_led1", phy3_led1),
> + PINCTRL_FUNC_DESC("phy4_led1", phy4_led1),
> +};
[Severity: High]
Does this code completely omit the "i2c" function?
It seems missing from this array, meaning I2C cannot be selected via the device
tree to clear the I2C_SCL/SDA_GPIO_MODE_MASK bits on pins 30 and 31.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260804160419.3592327-1-mikhail.kshevetskiy@iopsys.eu?part=35
next prev parent reply other threads:[~2026-08-04 16:35 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 16:03 [PATCH v9 00/36] pinctrl: airoha: split on shared and SoC drivers, add more SoCs Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 01/36] dt-bindings: pinctrl: airoha: en7581: fix misprint in i2s function name Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 02/36] dt-bindings: pinctrl: airoha: an7583: fix device tree binding schema Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 03/36] pinctrl: airoha: fix mdio bitfield names Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 04/36] pinctrl: airoha: an7581: fix pinconf of i2c_scl/i2c_sda pins Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 05/36] pinctrl: airoha: an7583: fix I2C0_SDA_PD register bit order Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 06/36] pinctrl: airoha: an7581: fix mux/conf of pcie_reset pins Mikhail Kshevetskiy
2026-08-04 16:27 ` sashiko-bot
2026-08-04 16:03 ` [PATCH v9 07/36] dt-bindings: pinctrl: airoha: en7581: allow configuration of pcie_reset pins as gpio or pwm Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 08/36] pinctrl: airoha: an7583: fix muxing of non-gpio default pins Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 09/36] dt-bindings: pinctrl: airoha: an7583: allow configuration of non-gpio default pins as gpio and pwm Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 10/36] pinctrl: airoha: fix I2C1 pin mux config for AN7581 Mikhail Kshevetskiy
2026-08-04 16:28 ` sashiko-bot
2026-08-04 16:03 ` [PATCH v9 11/36] pinctrl: airoha: fix I2C pin mux config for AN7583 Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 12/36] pinctrl: airoha: fix AN7583 MDIO pin mux config Mikhail Kshevetskiy
2026-08-04 16:28 ` sashiko-bot
2026-08-04 16:03 ` [PATCH v9 13/36] pinctrl: airoha: an7583: fix spi group pins Mikhail Kshevetskiy
2026-08-04 16:03 ` [PATCH v9 14/36] pinctrl: airoha: add missed get_direction() function for gpio_chip Mikhail Kshevetskiy
2026-08-04 16:26 ` sashiko-bot
2026-08-04 16:03 ` [PATCH v9 15/36] pinctrl: airoha: add set_direction() helper " Mikhail Kshevetskiy
2026-08-04 16:26 ` sashiko-bot
2026-08-04 16:03 ` [PATCH v9 16/36] pinctrl: airoha: minor improvements Mikhail Kshevetskiy
2026-08-04 16:23 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 17/36] pinctrl: airoha: fix getting gpiochip/pinctrl pointers in the IRQ handling code Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 18/36] pinctrl: airoha: add missed IRQ resource helpers Mikhail Kshevetskiy
2026-08-04 16:24 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 19/36] pinctrl: airoha: fix IRQ mask/unmask code Mikhail Kshevetskiy
2026-08-04 16:32 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 20/36] pinctrl: airoha: fix edge-triggered interrupts handling Mikhail Kshevetskiy
2026-08-04 16:23 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 21/36] pinctrl: airoha: remove not needed irq_type[] array Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 22/36] pinctrl: airoha: statically allocate gpio regs structure Mikhail Kshevetskiy
2026-08-04 16:30 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 23/36] pinctrl: airoha: move common definitions to the separate header Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 24/36] pinctrl: airoha: split driver on shared code and SoC specific drivers Mikhail Kshevetskiy
2026-08-04 16:38 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 25/36] pinctrl: airoha: an7581: remove en7581 prefix from variable names Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 26/36] pinctrl: airoha: an7583: remove an7583 prefix from variable names and definitions Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 27/36] pinctrl: airoha: an7583: rename registers to match its an7583 names Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 28/36] pinctrl: airoha: an7583: add support for npu_uart pinmux Mikhail Kshevetskiy
2026-08-04 16:30 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 29/36] pinctrl: airoha: an7583: add support for pon_alt pinmux Mikhail Kshevetskiy
2026-08-04 16:29 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 30/36] pinctrl: airoha: an7583: add support for olt pinmux Mikhail Kshevetskiy
2026-08-04 16:38 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 31/36] dt-bindings: pinctrl: airoha: an7583: add missed features Mikhail Kshevetskiy
2026-08-04 16:04 ` [PATCH v9 32/36] pinctrl: airoha: add support of en7523 SoC Mikhail Kshevetskiy
2026-08-04 16:44 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 33/36] pinctrl: airoha: try to find chip scu node by phandle first Mikhail Kshevetskiy
2026-08-04 16:30 ` sashiko-bot
2026-08-04 16:04 ` [PATCH v9 34/36] dt-bindings: pinctrl: airoha: add support of en7523 pin controller Mikhail Kshevetskiy
2026-08-04 16:34 ` sashiko-bot
2026-08-04 18:19 ` Rob Herring (Arm)
2026-08-04 16:04 ` [PATCH v9 35/36] pinctrl: airoha: add support of an7563 SoC Mikhail Kshevetskiy
2026-08-04 16:35 ` sashiko-bot [this message]
2026-08-04 16:04 ` [PATCH v9 36/36] dt-bindings: pinctrl: airoha: add support of an7563 pin controller Mikhail Kshevetskiy
2026-08-04 16:33 ` sashiko-bot
2026-08-04 18:19 ` Rob Herring (Arm)
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=20260804163554.1638A1F000E9@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.