From: sashiko-bot@kernel.org
To: "Mikhail Kshevetskiy" <mikhail.kshevetskiy@iopsys.eu>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v8 34/35] pinctrl: airoha: add support of an7563 SoC
Date: Mon, 27 Jul 2026 18:16:44 +0000 [thread overview]
Message-ID: <20260727181645.4FAE41F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260727174141.664933-35-mikhail.kshevetskiy@iopsys.eu>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Missing pinmux functions to restore dedicated GPIO pads to GPIO mode and standalone pads to their native functions, and the MDIO function fails to clear GPIO override bits.
--
--- Patch [34]: [PATCH v8 34/35] pinctrl: airoha: add support of an7563 SoC ---
commit 17737ef79ed00a92161a7a544b4f3bec1f3d0e5c
Author: Mikhail Kshevetskiy <mikhail.kshevetskiy@iopsys.eu>
pinctrl: airoha: add support of an7563 SoC
This commit introduces support for the Airoha AN7563 SoC pin controller. It
provides pin definitions, group mappings, and pinmux functionalities for various
interfaces like PON, MDIO, I2C, and PWM.
> 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 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 code leave the I2C_SCL_GPIO_MODE_MASK and I2C_SDA_GPIO_MODE_MASK
bits set when configuring the mdio function?
If these pads were previously overridden to GPIO mode (for instance, by the
bootloader), setting the SGMII MDIO mode bit here might not be sufficient to
restore MDIO functionality if the GPIO override bits aren't also cleared.
[ ... ]
> +static const struct airoha_pinctrl_func_group gpio_func_group[] = {
> + AIROHA_PINCTRL_GPIO_EXT("gpio28", GPIO28_FLASH_MODE_CFG,
> + GPIO_PCIE_RESET0_MASK),
> + AIROHA_PINCTRL_GPIO_EXT("gpio29", GPIO29_FLASH_MODE_CFG,
> + GPIO_PCIE_RESET1_MASK),
> + AIROHA_PINCTRL_GPIO_EXT("gpio30", GPIO30_FLASH_MODE_CFG,
> + I2C_SCL_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO_EXT("gpio31", GPIO31_FLASH_MODE_CFG,
> + I2C_SDA_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO("gpio32", SPI_CLK_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO("gpio33", SPI_CS_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO("gpio34", SPI_MOSI_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO("gpio35", SPI_MISO_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO_EXT("gpio36", GPIO36_FLASH_MODE_CFG,
> + UART_TXD_GPIO_MODE_MASK),
> + AIROHA_PINCTRL_GPIO_EXT("gpio37", GPIO37_FLASH_MODE_CFG,
> + UART_RXD_GPIO_MODE_MASK),
> +};
[Severity: High]
Is this missing definitions for gpio0 through gpio27?
If these dedicated GPIO pads are ever configured for an alternate function
like PWM, it appears they cannot be switched back to GPIO mode via the pinctrl
subsystem because they are omitted from this function group.
[ ... ]
> +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]
Should this list include native pad functions for I2C, SPI, and UART1?
If the bootloader leaves these standalone pads in GPIO mode, there currently
appears to be no pinmux function available here to clear the GPIO override
bits and restore their native interfaces.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260727174141.664933-1-mikhail.kshevetskiy@iopsys.eu?part=34
next prev parent reply other threads:[~2026-07-27 18:16 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
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 [this message]
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=20260727181645.4FAE41F000E9@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