From: Troy Mitchell <troy.mitchell@linux.spacemit.com>
To: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>,
Troy Mitchell <troy.mitchell@linux.spacemit.com>,
dlan@gentoo.org
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com, alex@ghiti.fr,
aou@eecs.berkeley.edu, conor+dt@kernel.org, krzk+dt@kernel.org,
robh@kernel.org, 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 v4] riscv: dts: spacemit: add UART pinctrl combinations
Date: Wed, 17 Sep 2025 16:42:57 +0800 [thread overview]
Message-ID: <A00BFAFA3FC941AF+aMp0kSc6UkR4QUn4@LT-Guozexi> (raw)
In-Reply-To: <b76520ff-f039-465c-a58d-8f0f37bd1664@hammernet.be>
On Wed, Sep 17, 2025 at 10:17:16AM +0200, Hendrik Hamerlinck wrote:
> Hello Troy,
>
> Thank you for reviewing.
>
> On 9/17/25 09:46, Troy Mitchell wrote:
> > Hi Hendrik, Thanks for your patch!
> >
> > On Wed, Sep 17, 2025 at 08:59:07AM +0200, 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>
> >> Reviewed-by: Yixun Lan <dlan@gentoo.org>
> >> ---
> >> Changes in v4:
> >> - Explicitly use 0 as bias-pull-up value
> >>
> >> 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 | 430 ++++++++++++++++++-
> >> 1 file changed, 428 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi b/arch/riscv/boot/dts/spacemit/k1-pinctrl.dtsi
> >> + /omit-if-no-ref/
> >> + uart2_0_cts_rts_cfg: uart2-0-cts-rts-cfg {
> >> + uart2-0-pins {
> >> + pinmux = <K1_PADCONF(23, 1)>, /* uart2_cts */
> >> + <K1_PADCONF(24, 1)>; /* uart2_rts */
> >> + bias-pull-up = <0>;
> >> + drive-strength = <32>;
> >> + };
> >> + };
> > We are currently using the 8250 UART driver, but hardware flow control does not
> > work properly on K1. We are considering fixing this when time permits.
> >
> > Should we add a comment here to avoid confusing others who may run into this?
> > If so, I will remove the comment once the issue has been fixed.
> Not sure if I’m missing something, but hardware flow control seems to work
> with the `8250_of` driver?
>
> On both ends I configured the ports with:
> `stty -F /dev/ttyS1 115200 crtscts -ixon -ixoff raw -echo`
>
> With this setup, data sent with echo only goes through when the peer is
> actually reading on the other side, which looks like RTS/CTS is
> functioning correctly.
Let me clarify my earlier reply(I have double checked):
It is not that hardware flow control does not work at all,
but rather that it fails intermittently.
The higher the baud rate, the sooner the problem tends to show up.
From your log I noticed the baud rate is 115200.
At this rate, it might take a full day of continuous testing before
the issue appears (though of course it could also fail much sooner, since it is probabilistic).
So I am wondering whether we should add a comment here,
or instead put the note in the UART node.
- Troy
>
> >
> > Anyway,
> >
> > Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
> >> +
> >> + /omit-if-no-ref/
> >> + uart3_0_cfg: uart3-0-cfg {
> >> + uart3-0-pins {
> >> + pinmux = <K1_PADCONF(81, 2)>, /* uart3_txd */
> >> + <K1_PADCONF(82, 2)>; /* uart3_rxd */
> >> + bias-pull-up = <0>;
> >> + drive-strength = <32>;
> >> + };
> >> + };
> >> +
> ...
> >> --
> >> 2.43.0
> >>
> >>
> >> _______________________________________________
> >> linux-riscv mailing list
> >> linux-riscv@lists.infradead.org
> >> http://lists.infradead.org/mailman/listinfo/linux-riscv
> Kind regards,
> Hendrik
>
next prev parent reply other threads:[~2025-09-17 8:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 6:59 Hendrik Hamerlinck
2025-09-17 7:46 ` Troy Mitchell
2025-09-17 8:17 ` Hendrik Hamerlinck
2025-09-17 8:42 ` Troy Mitchell [this message]
2025-09-17 9:05 ` Yixun Lan
2025-09-17 9:10 ` Troy Mitchell
2025-10-13 23:59 ` Yixun Lan
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=A00BFAFA3FC941AF+aMp0kSc6UkR4QUn4@LT-Guozexi \
--to=troy.mitchell@linux.spacemit.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.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
all inboxes | Powered by JetHome®