public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Yixun Lan <dlan@gentoo.org>
To: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Cc: Hendrik Hamerlinck <hendrik.hamerlinck@hammernet.be>,
	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 17:05:32 +0800	[thread overview]
Message-ID: <20250917090532-GYA1265528@gentoo.org> (raw)
In-Reply-To: <A00BFAFA3FC941AF+aMp0kSc6UkR4QUn4@LT-Guozexi>

Hi Troy,

On 16:42 Wed 17 Sep     , Troy Mitchell wrote:
> 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.
No, please start another thread to address this issue, find a solution
and then ideally work out a patch for it, adding comment doesn't really help.

Besides, what Hendrik doing here is to complete the descriptions of UART pinctrl
which is a different thing, let's not mix them together.

-- 
Yixun Lan (dlan)

  reply	other threads:[~2025-09-17  9:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-17  6:59 [PATCH v4] riscv: dts: spacemit: add UART pinctrl combinations Hendrik Hamerlinck
2025-09-17  7:46 ` Troy Mitchell
2025-09-17  8:17   ` Hendrik Hamerlinck
2025-09-17  8:42     ` Troy Mitchell
2025-09-17  9:05       ` Yixun Lan [this message]
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=20250917090532-GYA1265528@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 \
    --cc=troy.mitchell@linux.spacemit.com \
    /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