[PATCH 2/7] pinctrl: sunxi: only use PortK special handling on A523
Chen-Yu Tsai
wens at kernel.org
Thu Sep 10 07:56:21 PDT 2026
On Thu, Sep 10, 2026 at 9:35 PM Andre Przywara <andre.przywara at arm.com> wrote:
>
> The Allwinner A523 pinctrl IP requires an exception for addressing PortK,
> since the registers for this GPIO bank did not fit anymore in the
> existing MMIO frame. Since the A523 was also the first SoC to actually
> implement PortK, we just enabled this quirk unconditionally.
> Now the new Allwinner A733 changed the MMIO frame layout, so PortK can
> and must be handled without any special code.
>
> Mark the special casing for PortK with the ELEVEN_BANKS quirk flag we
> introduced, so that it will only be used on SoCs using the A523 pinctrl
> IP.
>
> Signed-off-by: Andre Przywara <andre.przywara at arm.com>
Reviewed-by: Chen-Yu Tsai <wens at kernel.org>
> ---
> drivers/pinctrl/sunxi/pinctrl-sunxi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
> index bc6948e3fb495..2524e0b3a2a5a 100644
> --- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
> +++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
> @@ -67,7 +67,7 @@ static u32 sunxi_bank_offset(const struct sunxi_pinctrl *pctl, u32 pin)
> {
> u32 offset = 0;
>
> - if (pin >= PK_BASE) {
> + if (pin >= PK_BASE && (pctl->flags & SUNXI_PINCTRL_ELEVEN_BANKS)) {
> pin -= PK_BASE;
> offset = PIO_BANK_K_OFFSET;
> }
> --
> 2.47.3
>
More information about the linux-arm-kernel
mailing list