From patchwork Sat Mar 29 12:47:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pericycle X-Patchwork-Id: 2066677 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=per1cycle.org header.i=@per1cycle.org header.a=rsa-sha256 header.s=dkim header.b=RZFWLGHc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZPxyL6rtlz1yHD for ; Sat, 29 Mar 2025 23:48:10 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B6E02805C8; Sat, 29 Mar 2025 13:48:16 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=per1cycle.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=per1cycle.org header.i=@per1cycle.org header.b="RZFWLGHc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 06EAD81951; Sat, 29 Mar 2025 13:48:15 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.per1cycle.org (mail.per1cycle.org [188.245.231.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8A3008059D for ; Sat, 29 Mar 2025 13:48:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=per1cycle.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=me@per1cycle.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 7DF9A3FAF8; Sat, 29 Mar 2025 12:48:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=per1cycle.org; s=dkim; t=1743252489; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sJzxQCqJU6MBD0w+BWJXcms0XH9yC+AOulprQAesu6c=; b=RZFWLGHc90PTIwjqgW3G12mG8KKe6t8SQ3mjUx+3oaDGrg8M/KekreByNAWiF3PGCevVms cUzpygKjVfMd9EDbS/jcLp1APE/2La2/+Bhj+sXQy1V4HH3PYV026lGOyKd8q74avXg/n8 PUR/mUo7Ikd7yZnL1oAqND7R2xDVv19APpRrAFJZn++hkwrj1UaPWL9WwT+6+E9j/Htt/g gjRKqckVbCT8OixexyUpPzfROZYUR809AcgivxBMkTXlob6NRDhVyfznU9uyqCSk916EVz WnEj4wl80jXxsRfBBlcHDlY00wDziMv9e3Ndw6k9+RDRzNaT8aCYReQ/Hf3h1Q== From: Huan Zhou Date: Sat, 29 Mar 2025 20:47:59 +0800 Subject: [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts. MIME-Version: 1.0 Message-Id: <20250329-pinctrl-k1-v1-1-3083d7057989@per1cycle.org> References: <20250329-pinctrl-k1-v1-0-3083d7057989@per1cycle.org> In-Reply-To: <20250329-pinctrl-k1-v1-0-3083d7057989@per1cycle.org> To: u-boot Cc: Rick Chen , Leo , Tom Rini , Yixun Lan , Huan Zhou , Huan Zhou X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1743252484; l=2081; i=me@per1cycle.org; s=20241231; h=from:subject:message-id; bh=bEAuLnpu5S1BO39Kqkim+uMbKSfPHs3/8y2vKQ8u7pA=; b=++jmFPVC84fvwxOAXU1rqyB+6JiLQvcKKwjZBvTtmndKoQOP9HES+iOnNzPvPo36oRKU0O/bo aE6vhBXtDjtC2DMGG4CTgB1Naq+xpw4C/9K5O+hT0l0VbFP+JfBedde X-Developer-Key: i=me@per1cycle.org; a=ed25519; pk=LfN2kXe1uCRoaEzAJ8quXuPIH4MiEnZHOCRZwGytJwE= X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add pinctrl node in device tree and update in bananapi f3 dts. Signed-off-by: Huan Zhou Reviewed-by: Leo Yu-Chi Liang --- arch/riscv/dts/k1-bananapi-f3.dts | 3 +++ arch/riscv/dts/k1-pinctrl.dtsi | 19 +++++++++++++++++++ arch/riscv/dts/k1.dtsi | 8 +++++++- 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/arch/riscv/dts/k1-bananapi-f3.dts b/arch/riscv/dts/k1-bananapi-f3.dts index d2486f70906143ad1f2bde753f12dea5bab2e5ab..6b5b83bcdb9ae4553c5fb63a7a9684f5d47a456e 100644 --- a/arch/riscv/dts/k1-bananapi-f3.dts +++ b/arch/riscv/dts/k1-bananapi-f3.dts @@ -5,6 +5,7 @@ #include "k1.dtsi" #include "binman.dtsi" +#include "k1-pinctrl.dtsi" / { model = "Banana Pi BPI-F3"; @@ -21,5 +22,7 @@ }; &uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_2_cfg>; status = "okay"; }; diff --git a/arch/riscv/dts/k1-pinctrl.dtsi b/arch/riscv/dts/k1-pinctrl.dtsi new file mode 100644 index 0000000000000000000000000000000000000000..14e7096fbcfdc88a9f9989993fdd2aca6de7462e --- /dev/null +++ b/arch/riscv/dts/k1-pinctrl.dtsi @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2022 Spacemit Inc. + * Copyright (C) 2025 Yixun Lan + */ + +#define K1_PADCONF(pin, func) (((pin) << 16) | (func)) + +&pinctrl { + uart0_2_cfg: uart0-2-cfg { + uart0-2-pins { + pinmux = , + ; + + bias-pull-up = <0>; + drive-strength = <32>; + }; + }; +}; diff --git a/arch/riscv/dts/k1.dtsi b/arch/riscv/dts/k1.dtsi index 514be453dbaf6713cdf4ad5a5d653488297ebb83..4626bdd48b2a5dfc3a29ffcdbcec608b4a2573ac 100644 --- a/arch/riscv/dts/k1.dtsi +++ b/arch/riscv/dts/k1.dtsi @@ -455,5 +455,11 @@ reg-io-width = <4>; status = "reserved"; /* for TEE usage */ }; + + pinctrl: pinctrl@d401e000 { + compatible = "spacemit,k1-pinctrl", "pinctrl-single"; + reg = <0x0 0xd401e000 0x0 0x400>; + pinctrl-single,register-width = <32>; + }; }; -}; \ No newline at end of file +}; From patchwork Sat Mar 29 12:48:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: pericycle X-Patchwork-Id: 2066678 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=per1cycle.org header.i=@per1cycle.org header.a=rsa-sha256 header.s=dkim header.b=G2OLnU+q; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4ZPxyT676bz1yHD for ; Sat, 29 Mar 2025 23:48:17 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 180A181E5A; Sat, 29 Mar 2025 13:48:20 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=per1cycle.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=per1cycle.org header.i=@per1cycle.org header.b="G2OLnU+q"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1822381DCD; Sat, 29 Mar 2025 13:48:17 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mail.per1cycle.org (mail.per1cycle.org [188.245.231.141]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2E24C8059D for ; Sat, 29 Mar 2025 13:48:15 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=per1cycle.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=me@per1cycle.org Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 603AF3FB33; Sat, 29 Mar 2025 12:48:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=per1cycle.org; s=dkim; t=1743252494; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xqsLQpnIN3vVdy1eHsDOvk6k9CtY/YJWIDI2BiI1dzQ=; b=G2OLnU+qqoo0UvSxoX3T/54DtO6AKSOYzgCjzmtBe6pQlbDSif5z8Ds15WJlBF9VTOuh5T CftjFuCPY2VC4dL3HC0L3UE+OH+lyaSh+YTtecWzjmo3OOJhjjCXD9Y9T3HCP2Uydlzb1k nFZ8DAbK9xTnd7fragBbv871AWHRL/yZe7QDTh8JTZLNocY7foQhzryEPWaZyDX6RRzm4l kRBmUeF1LFfC/l1nxIcmfgxEx1SAyz6+QuieS2RfCyIobZ8cal/QjZBqNt4DvcPF3CZGz7 UNpdvhJ0ZPQA9UfEMWzLgKPWTWlZEEpvisW+SnQy9iZo+IMdju/yMvEdZwZ1HQ== From: Huan Zhou Date: Sat, 29 Mar 2025 20:48:00 +0800 Subject: [PATCH 2/2] config: Enable pinctrl in bananapi-f3 MIME-Version: 1.0 Message-Id: <20250329-pinctrl-k1-v1-2-3083d7057989@per1cycle.org> References: <20250329-pinctrl-k1-v1-0-3083d7057989@per1cycle.org> In-Reply-To: <20250329-pinctrl-k1-v1-0-3083d7057989@per1cycle.org> To: u-boot Cc: Rick Chen , Leo , Tom Rini , Yixun Lan , Huan Zhou , Huan Zhou X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1743252484; l=625; i=me@per1cycle.org; s=20241231; h=from:subject:message-id; bh=YNeTY80ecGx2zxEHAw9/7mScc39LE+REIPNiyHBip4Y=; b=lB9l7/QndxtuRDkkaQMA2EoimQDgKSXm2uChofzpGwCRP3mt8+1SYQpCFOaPi+fO6XwkMeda7 xywDPz7eu2/C/q3tC+uWJsWKGYN9VHxfRiLicWdmUvjZJJLi9Cppaah X-Developer-Key: i=me@per1cycle.org; a=ed25519; pk=LfN2kXe1uCRoaEzAJ8quXuPIH4MiEnZHOCRZwGytJwE= X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Add pinctrl support in bananapi-f3 platform Signed-off-by: Huan Zhou Reviewed-by: Leo Yu-Chi Liang --- configs/bananapi-f3_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configs/bananapi-f3_defconfig b/configs/bananapi-f3_defconfig index 0f12db3db848badda1fc7192aeb0190ac22a269d..12aa67d4f0de580736c21fc3764125ce17726d1c 100644 --- a/configs/bananapi-f3_defconfig +++ b/configs/bananapi-f3_defconfig @@ -18,3 +18,5 @@ CONFIG_HUSH_PARSER=y CONFIG_ENV_OVERWRITE=y CONFIG_SYS_NS16550=y CONFIG_SYS_NS16550_MEM32=y +CONFIG_PINCTRL=y +CONFIG_PINCTRL_SINGLE=y \ No newline at end of file