mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Lin <shawn.lin@rock-chips.com>
To: ricardo@pardini.net, Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Manivannan Sadhasivam <mani@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: shawn.lin@rock-chips.com, Lucas Tanure <tanure@linux.com>,
	linux-phy@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
	Yifeng Zhao <yifeng.zhao@rock-chips.com>,
	stable@vger.kernel.org,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: Re: [PATCH v2] phy: rockchip: naneng-combphy: fix RK3588 SATA pipe_con1 register offset
Date: Mon, 16 Nov 2026 10:31:23 +0800	[thread overview]
Message-ID: <eb51e0bf-148a-4d8b-8110-b65094fa1b43@rock-chips.com> (raw)
In-Reply-To: <20261115-rk3588-combphy-sata2-6g-v2-1-778e0e8011fe@pardini.net>

在 2026/11/15 星期日 23:48, Ricardo Pardini via B4 Relay 写道:
> From: Yifeng Zhao <yifeng.zhao@rock-chips.com>
> 
> On RK3588, the sata2 PHY speed is selected by sata2_phy_spdmode in
> PHP_GRF_PHP_CON1[1:0] (offset 0x0004), with sata2_phy_rx_err in bit 2.
> rk3588_combphy_grfcfgs has pipe_con1_for_sata at offset 0x0000 though,
> so the value 0x2 (6.0 Gb/s, rx_err cleared) ends up in PHP_GRF_PHP_CON0
> and CON1 is never written.
> 
> This leaves sata2 at its 1.5 Gb/s reset value, so the link only trains
> at 1.5 Gb/s, even with a 6 Gb/s capable disk and no SControl speed
> limit. sata0 and sata1 are not affected: their speed fields are in
> PHP_GRF_PHP_CON0 and are set by pipe_con0_for_sata.
> 
> The misplaced write also lands in PHP_GRF_PHP_CON0[2:0], which are the
> PCIe link reset grant bits, and turns on the one for pcie3x2 whenever a
> combphy is put in SATA mode. No effect from that is known, but this
> stops it too.
> 
> The register layout is described in the RK3588 TRM V1.0 Part1, section
> 6.17 "PHP_GRF Register Description".
> 
> Tested with an mSATA SSD on sata2 (combphy2_psu). Before:
> 
>    ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
>    Timing O_DIRECT disk reads: 374 MB in 3.01 seconds = 124.45 MB/sec
> 
> After:
> 
>    ata2: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
>    Timing O_DIRECT disk reads: 1266 MB in 3.00 seconds = 421.78 MB/sec
> 

Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>

      reply	other threads:[~2026-11-16  2:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-15 15:48 Ricardo Pardini via B4 Relay
2026-11-16  2:31 ` Shawn Lin [this message]

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=eb51e0bf-148a-4d8b-8110-b65094fa1b43@rock-chips.com \
    --to=shawn.lin@rock-chips.com \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=ricardo@pardini.net \
    --cc=sebastian.reichel@collabora.com \
    --cc=stable@vger.kernel.org \
    --cc=tanure@linux.com \
    --cc=vkoul@kernel.org \
    --cc=yifeng.zhao@rock-chips.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

all inboxes | Powered by JetHome®