Re: [PATCH v10 30/36] pinctrl: airoha: an7583: add support for olt pinmux

[email protected]
Newsgroups org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The `olt` and `pon_alt` pin functions share the same physical pins but do not mutually clear each other's configuration bits, potentially causing hardware multiplexing conflicts.
--

--- Patch [30]: [PATCH v10 30/36] pinctrl: airoha: an7583: add support for olt pinmux ---
commit ce9b28cb0ea433c895d9e6cfad60de0854d4d8c3
Author: Mikhail Kshevetskiy <[email protected]>
Date:   Wed Aug 5 12:34:02 2026 +0000

pinctrl: airoha: an7583: add support for olt pinmux

Add support for olt pin function for olt pin group.

Signed-off-by: Mikhail Kshevetskiy <[email protected]>

> diff --git a/drivers/pinctrl/airoha/pinctrl-an7583.c b/drivers/pinctrl/airoha/pinctrl-an7583.c
> index 2e145ef5a224c..031a8b36e0024 100644
> --- a/drivers/pinctrl/airoha/pinctrl-an7583.c
> +++ b/drivers/pinctrl/airoha/pinctrl-an7583.c

[ ... ]

> @@ -651,6 +655,19 @@ static const struct airoha_pinctrl_func_group pon_func_group[] = {
>  	},
>  };
>  
> +static const struct airoha_pinctrl_func_group olt_func_group[] = {
> +	{
> +		.name = "olt",
> +		.regmap[0] = {
> +			AIROHA_FUNC_MUX,
> +			REG_GPIO_PON_MODE,
> +			GPIO_OLT_MODE_MASK,

[Severity: High]
Will this mask configuration leave conflicting bits set if the pins were
previously configured for pon_alt mode?

Since the olt and pon_alt functions share the same physical pins (36
through 40), they appear to be mutually exclusive. When this mux
configuration is applied, it will set GPIO_OLT_MODE_MASK but won't clear
GPIO_PON_ALT_MODE_MASK or GPIO_PON_MODE_MASK if they were left set by the
bootloader or a previous runtime state.

Should the mask field include GPIO_PON_ALT_MODE_MASK and GPIO_PON_MODE_MASK
so they are properly cleared when olt is selected?

Additionally, does the existing pon_func_group need to be updated so that
selecting pon or pon_alt clears the newly added GPIO_OLT_MODE_MASK?

> +			GPIO_OLT_MODE_MASK
> +		},
> +		.regmap_size = 1,
> +	},
> +};
> +
>  static const struct airoha_pinctrl_func_group tod_1pps_func_group[] = {
>  	{
>  		.name = "pon_tod_1pps",

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=30
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.