riscv: dts: k1: add pinctrl property in dts.

Add pinctrl node in device tree and update
in bananapi f3 dts.

Signed-off-by: Huan Zhou <me@per1cycle.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
This commit is contained in:
Huan Zhou 2025-03-29 20:47:59 +08:00 committed by Leo Yu-Chi Liang
parent a7bc58409f
commit d1cea78af4
3 changed files with 29 additions and 1 deletions

View File

@ -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";
};

View File

@ -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>;
};
};
};

View File

@ -470,5 +470,11 @@
#reset-cells = <1>;
status = "disabled";
};
pinctrl: pinctrl@d401e000 {
compatible = "spacemit,k1-pinctrl", "pinctrl-single";
reg = <0x0 0xd401e000 0x0 0x400>;
pinctrl-single,register-width = <32>;
};
};
};
};