From: Yixun Lan <dlan@gentoo.org>
To: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
Cc: robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, alex@ghiti.fr, skhan@linuxfoundation.org,
linux-kernel-mentees@lists.linux.dev, devicetree@vger.kernel.org,
linux-riscv@lists.infradead.org, spacemit@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] riscv: dts: spacemit: add UART pinctrl combinations
Date: Wed, 17 Sep 2025 09:29:41 +0800 [thread overview]
Message-ID: <20250917012941-GYA1263349@gentoo.org> (raw)
In-Reply-To: <20250916064739.196695-1-hendrik.hamerlinck@hammernet.be>
Hi Hendrik,
On 08:47 Tue 16 Sep , Hendrik Hamerlinck wrote:
> Add UART pinctrl configurations based on the SoC datasheet and the
> downstream Bianbu Linux tree. The drive strength values were taken from
> the downstream implementation, which uses medium drive strength.
> CTS/RTS are moved to separate *-cts-rts-cfg states so boards can enable
> hardware flow control conditionally.
>
> Signed-off-by: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>
> ---
> Changes in v3:
> - Added /omit-if-no-ref/ to pinctrl states to reduce DT size
>
> Changes in v2:
> - Split cts/rts into separate pinctrl configs as suggested
> - Removed options from board DTS files to keep them cleaner
> ---
> arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi | 432 ++++++++++++++++++-
> 1 file changed, 429 insertions(+), 3 deletions(-)
>
> diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> index 381055737422..7811fb485bd4 100644
> --- a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> @@ -11,12 +11,438 @@
> #define K1_GPIO(x) (x / 32) (x % 32)
>
> &pinctrl {
> + /omit-if-no-ref/
> + uart0_0_cfg: uart0-0-cfg {
> + uart0-0-pins {
> + pinmux = <K1_PADCONF(104, 3)>, /* uart0_txd */
> + <K1_PADCONF(105, 3)>; /* uart0_rxd */
> + power-source = <3300>;
> + bias-pull-up;
> + drive-strength = <19>;
> + };
> + };
> +
> + /omit-if-no-ref/
> + uart0_1_cfg: uart0-1-cfg {
> + uart0-1-pins {
> + pinmux = <K1_PADCONF(108, 1)>, /* uart0_txd */
> + <K1_PADCONF(80, 3)>; /* uart0_rxd */
> + power-source = <3300>;
..
> + bias-pull-up;
here, see comment below
> + drive-strength = <19>;
> + };
> + };
> +
> + /omit-if-no-ref/
> uart0_2_cfg: uart0-2-cfg {
> uart0-2-pins {
> - pinmux = <K1_PADCONF(68, 2)>,
> - <K1_PADCONF(69, 2)>;
> + pinmux = <K1_PADCONF(68, 2)>, /* uart0_txd */
> + <K1_PADCONF(69, 2)>; /* uart0_rxd */
> + bias-pull-up;
> + drive-strength = <32>;
> + };
> + };
>
> - bias-pull-up = <0>;
Sorry, I've overlooked this, the bias-pull-up need to explicitly set to
a vale of 0, 1 - normal pull up, or strong pull up.. for uart, the normal
pull up should be ok
please refer Documentation/devicetree/bindings/pinctrl/spacemit,k1-pinctrl.yaml
Since the rc6 is already tagged, I'm about to prepare a PR, so If you able
to respin a new version quickly, I'd be happy to take, otherwise let's wait
for next merge window (which shouldn't be a big problem)
btw, please always do a DT check:
make ARCH=riscv dtbs_check W=1
--
Yixun Lan (dlan)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2025-09-17 1:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-16 6:47 [PATCH v3] riscv: dts: spacemit: add UART pinctrl combinations Hendrik Hamerlinck
2025-09-16 8:57 ` Yixun Lan
2025-09-17 1:29 ` Yixun Lan [this message]
2025-09-17 6:39 ` Hendrik Hamerlinck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250917012941-GYA1263349@gentoo.org \
--to=dlan@gentoo.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=hendrik.hamerlinck@hammernet.be \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=spacemit@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox