From patchwork Thu Aug 21 00:42:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 1203 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D4D11B4F0E for ; Thu, 21 Aug 2025 00:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755737149; cv=none; b=XkbRfVj2UnLSw7+zwi0ncpWHNp1F38gWIS1ZoSzTvTMpdW8cWobp2TRSe7rJoOh/q9Ui0mnpTZwg7DHpvAs9WSLLbSBmX5jLkw0t9gQ5rvbav5tT1B0je/qtAJ+lmYc6rwhUuERJumNHpE+gDZMA1kde8iwYXp+6KUu/y58val0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755737149; c=relaxed/simple; bh=0OEygut+RxWS2rm0T1RcAcv45NFTwBUwmnwutiogBFo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WKDc26JDoQHbF/xViEjftBm71y+hYnVfoPmZdB6VKtQXVhEoOY15f5jleMTqHYLZMd4SDOs+RNyMACn9TMPORdLXVlI3PLk6+11uueI71GMPWjrmCgBRtXL6b1/1zPZwnkbqltadTIJ65V1WsEMcwXKEGsBy/zrPq+KmXpRVf/A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 67ED82573; Wed, 20 Aug 2025 17:45:39 -0700 (PDT) Received: from localhost.localdomain (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A630E3F63F; Wed, 20 Aug 2025 17:45:45 -0700 (PDT) From: Andre Przywara To: Linus Walleij , Chen-Yu Tsai , Samuel Holland , Jernej Skrabec Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev Subject: [RFC PATCH 3/9] pinctrl: sunxi: only use PortK special handling on A523 Date: Thu, 21 Aug 2025 01:42:26 +0100 Message-ID: <20250821004232.8134-4-andre.przywara@arm.com> X-Mailer: git-send-email 2.46.3 In-Reply-To: <20250821004232.8134-1-andre.przywara@arm.com> References: <20250821004232.8134-1-andre.przywara@arm.com> Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Status: O 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 --- 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 a5e390c7ba0ba..2af6ebef7a10b 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; }