* [PATCH 0/2] riscv: pinctrl: k1: Add pinctrl support for bannanapi-f3
@ 2025-03-29 12:47 Huan Zhou
2025-03-29 12:47 ` [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts Huan Zhou
2025-03-29 12:48 ` [PATCH 2/2] config: Enable pinctrl in bananapi-f3 Huan Zhou
0 siblings, 2 replies; 6+ messages in thread
From: Huan Zhou @ 2025-03-29 12:47 UTC (permalink / raw)
To: u-boot; +Cc: Rick Chen, Leo, Tom Rini, Yixun Lan, Huan Zhou, Huan Zhou
The series add basic support for pinctrl for bananapi-f3
which reuse pinctrl-single as its driver.
boot log:
https://gist.github.com/per1cycle/27aa0d4de732e96eeeb842e75168e0c8
Signed-off-by: Huan Zhou <me@per1cycle.org>
---
Huan Zhou (2):
riscv: dts: k1: add pinctrl property in dts.
config: Enable pinctrl in bananapi-f3
arch/riscv/dts/k1-bananapi-f3.dts | 3 +++
arch/riscv/dts/k1-pinctrl.dtsi | 19 +++++++++++++++++++
arch/riscv/dts/k1.dtsi | 8 +++++++-
configs/bananapi-f3_defconfig | 2 ++
4 files changed, 31 insertions(+), 1 deletion(-)
---
base-commit: 482aaebcabab35d2867e040d08fbdca6bbbe7a0c
change-id: 20250215-pinctrl-k1-a7045bbd9eb6
Best regards,
--
Huan Zhou <me@per1cycle.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts.
2025-03-29 12:47 [PATCH 0/2] riscv: pinctrl: k1: Add pinctrl support for bannanapi-f3 Huan Zhou
@ 2025-03-29 12:47 ` Huan Zhou
2025-04-08 10:44 ` Leo Liang
2025-03-29 12:48 ` [PATCH 2/2] config: Enable pinctrl in bananapi-f3 Huan Zhou
1 sibling, 1 reply; 6+ messages in thread
From: Huan Zhou @ 2025-03-29 12:47 UTC (permalink / raw)
To: u-boot; +Cc: Rick Chen, Leo, Tom Rini, Yixun Lan, Huan Zhou, Huan Zhou
Add pinctrl node in device tree and update
in bananapi f3 dts.
Signed-off-by: Huan Zhou <me@per1cycle.org>
---
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 <dlan@gentoo.org>
+ */
+
+#define K1_PADCONF(pin, func) (((pin) << 16) | (func))
+
+&pinctrl {
+ uart0_2_cfg: uart0-2-cfg {
+ uart0-2-pins {
+ pinmux = <K1_PADCONF(68, 2)>,
+ <K1_PADCONF(69, 2)>;
+
+ 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
+};
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] config: Enable pinctrl in bananapi-f3
2025-03-29 12:47 [PATCH 0/2] riscv: pinctrl: k1: Add pinctrl support for bannanapi-f3 Huan Zhou
2025-03-29 12:47 ` [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts Huan Zhou
@ 2025-03-29 12:48 ` Huan Zhou
2025-04-08 10:45 ` Leo Liang
1 sibling, 1 reply; 6+ messages in thread
From: Huan Zhou @ 2025-03-29 12:48 UTC (permalink / raw)
To: u-boot; +Cc: Rick Chen, Leo, Tom Rini, Yixun Lan, Huan Zhou, Huan Zhou
Add pinctrl support in bananapi-f3 platform
Signed-off-by: Huan Zhou <me@per1cycle.org>
---
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
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts.
2025-03-29 12:47 ` [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts Huan Zhou
@ 2025-04-08 10:44 ` Leo Liang
2025-04-08 11:12 ` pericycle
0 siblings, 1 reply; 6+ messages in thread
From: Leo Liang @ 2025-04-08 10:44 UTC (permalink / raw)
To: Huan Zhou; +Cc: u-boot, Rick Chen, Tom Rini, Yixun Lan, Huan Zhou
On Sat, Mar 29, 2025 at 08:47:59PM +0800, Huan Zhou wrote:
> Add pinctrl node in device tree and update
> in bananapi f3 dts.
>
> Signed-off-by: Huan Zhou <me@per1cycle.org>
> ---
> 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(-)
Hi Huan,
I could take this patch for now.
Would you consider using OF_UPSTREAM?
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] config: Enable pinctrl in bananapi-f3
2025-03-29 12:48 ` [PATCH 2/2] config: Enable pinctrl in bananapi-f3 Huan Zhou
@ 2025-04-08 10:45 ` Leo Liang
0 siblings, 0 replies; 6+ messages in thread
From: Leo Liang @ 2025-04-08 10:45 UTC (permalink / raw)
To: Huan Zhou; +Cc: u-boot, Rick Chen, Tom Rini, Yixun Lan, Huan Zhou
On Sat, Mar 29, 2025 at 08:48:00PM +0800, Huan Zhou wrote:
> Add pinctrl support in bananapi-f3 platform
>
> Signed-off-by: Huan Zhou <me@per1cycle.org>
> ---
> configs/bananapi-f3_defconfig | 2 ++
> 1 file changed, 2 insertions(+)
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts.
2025-04-08 10:44 ` Leo Liang
@ 2025-04-08 11:12 ` pericycle
0 siblings, 0 replies; 6+ messages in thread
From: pericycle @ 2025-04-08 11:12 UTC (permalink / raw)
To: Leo Liang; +Cc: u-boot, Rick Chen, Tom Rini, Yixun Lan
> On Apr 8, 2025, at 6:44 PM, Leo Liang <ycliang@andestech.com> wrote:
>
> On Sat, Mar 29, 2025 at 08:47:59PM +0800, Huan Zhou wrote:
>> Add pinctrl node in device tree and update
>> in bananapi f3 dts.
>>
>> Signed-off-by: Huan Zhou <me@per1cycle.org>
>> ---
>> 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(-)
>
> Hi Huan,
>
> I could take this patch for now.
> Would you consider using OF_UPSTREAM?
>
Ok, I’ll update in next version.
> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-04-08 11:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-29 12:47 [PATCH 0/2] riscv: pinctrl: k1: Add pinctrl support for bannanapi-f3 Huan Zhou
2025-03-29 12:47 ` [PATCH 1/2] riscv: dts: k1: add pinctrl property in dts Huan Zhou
2025-04-08 10:44 ` Leo Liang
2025-04-08 11:12 ` pericycle
2025-03-29 12:48 ` [PATCH 2/2] config: Enable pinctrl in bananapi-f3 Huan Zhou
2025-04-08 10:45 ` Leo Liang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox