* [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning
@ 2026-11-19 11:27 Abhishek Kumar
2026-11-19 11:32 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Abhishek Kumar @ 2026-11-19 11:27 UTC (permalink / raw)
To: Bartosz Golaszewski, Manivannan Sadhasivam, Bjorn Helgaas
Cc: linux-pci, krishna.chundru, Abhishek Kumar
On some boots, links on the PCIe switch report a continuous flood of
correctable AER errors (RxErr, BadTLP and Replay Timer Timeout) at
8 GT/s. This happens because the 8 GT/s equalization fine-tuning
setting is never programmed: max_num_of_fine_tuning_iterations_at_8gt
in K_EQUTUNING_033_028 resets to 0, so equalization only selects a
preset and never fine-tunes the transmitter coefficients for the
channel, leaving the link with marginal signal quality.
Fix this by programming one fine-tuning iteration on the upstream port
and downstream ports 1 and 2 at power-on, so that 8 GT/s equalization
adapts the transmitter coefficients to the channel. With this setting
the links no longer report any AER errors.
Signed-off-by: Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
---
drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
index 4091a2f30aa7..d27b009430f1 100644
--- a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
+++ b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
@@ -29,6 +29,9 @@
#define TC9563_PORT_L0S_DELAY 0x82496c
#define TC9563_PORT_L1_DELAY 0x824970
+#define TC9563_K_EQUTUNING_033_028 0x824a10
+#define TC9563_EQ_FINE_TUNING_ITER 1
+
#define TC9563_EMBEDDED_ETH_DELAY 0x8200d8
#define TC9563_ETH_L1_DELAY_MASK GENMASK(27, 18)
#define TC9563_ETH_L1_DELAY_VALUE(x) FIELD_PREP(TC9563_ETH_L1_DELAY_MASK, x)
@@ -346,6 +349,20 @@ static int tc9563_pwrctrl_set_nfts(struct tc9563_pwrctrl *tc9563,
ARRAY_SIZE(nfts_seq));
}
+static int tc9563_pwrctrl_set_eq_fine_tuning(struct tc9563_pwrctrl *tc9563)
+{
+ int ret;
+
+ ret = regmap_write(tc9563->regmap, TC9563_PORT_SELECT,
+ BIT(TC9563_USP) | BIT(TC9563_DSP1) |
+ BIT(TC9563_DSP2));
+ if (ret)
+ return ret;
+
+ return regmap_write(tc9563->regmap, TC9563_K_EQUTUNING_033_028,
+ TC9563_EQ_FINE_TUNING_ITER);
+}
+
static int tc9563_pwrctrl_assert_deassert_reset(struct tc9563_pwrctrl *tc9563,
bool deassert)
{
@@ -557,6 +574,12 @@ static int tc9563_pwrctrl_power_on(struct pci_pwrctrl *pwrctrl)
if (ret)
goto power_off;
+ ret = tc9563_pwrctrl_set_eq_fine_tuning(tc9563);
+ if (ret) {
+ dev_err(dev, "Failed to enable 8 GT/s EQ fine-tuning\n");
+ goto power_off;
+ }
+
for (i = 0; i < TC9563_MAX; i++) {
cfg = &tc9563->cfg[i];
ret = tc9563_pwrctrl_disable_port(tc9563, i);
---
base-commit: e8017d29067fd1310a65c3494ce1a1b492adbac6
change-id: 20261119-tc9563_fine_tune-1fee86f2e4a3
Best regards,
--
Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning
2026-11-19 11:27 [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning Abhishek Kumar
@ 2026-11-19 11:32 ` sashiko-bot
2026-11-19 13:12 ` Bartosz Golaszewski
2026-11-20 16:55 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: sashiko-bot @ 2026-11-19 11:32 UTC (permalink / raw)
To: Abhishek Kumar; +Cc: linux-pci
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] PCI/pwrctrl: tc9563: missing Fixes trailer for 8 GT/s EQ
fine-tuning fix
--
commit ae3834e64204d960937f7bf637e84695589097d7
Author: Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
> PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning
>
> On some boots, links on the PCIe switch report a continuous flood of
> correctable AER errors (RxErr, BadTLP and Replay Timer Timeout) at
> 8 GT/s. This happens because the 8 GT/s equalization fine-tuning
> setting is never programmed: max_num_of_fine_tuning_iterations_at_8gt
> in K_EQUTUNING_033_028 resets to 0, so equalization only selects a
> preset and never fine-tunes the transmitter coefficients for the
> channel, leaving the link with marginal signal quality.
>
> Fix this by programming one fine-tuning iteration on the upstream port
> and downstream ports 1 and 2 at power-on, so that 8 GT/s equalization
> adapts the transmitter coefficients to the channel. With this setting
> the links no longer report any AER errors.
>
> Signed-off-by: Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
[Severity: Low]
This fixes a missing initialization step from when the TC9563 power control
driver was introduced. Should this include:
Fixes: 4c9c7be47310 ("PCI: pwrctrl: Add power control driver for TC9563")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261119-tc9563_fine_tune-v1-1-b83c74bf1e94@oss.qualcomm.com?part=1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning
2026-11-19 11:27 [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning Abhishek Kumar
2026-11-19 11:32 ` sashiko-bot
@ 2026-11-19 13:12 ` Bartosz Golaszewski
2026-11-20 16:55 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2026-11-19 13:12 UTC (permalink / raw)
To: Abhishek Kumar
Cc: Manivannan Sadhasivam, Bjorn Helgaas, linux-pci, krishna.chundru
On Thu, Nov 19, 2026 at 04:57:12PM +0530, Abhishek Kumar wrote:
> On some boots, links on the PCIe switch report a continuous flood of
> correctable AER errors (RxErr, BadTLP and Replay Timer Timeout) at
> 8 GT/s. This happens because the 8 GT/s equalization fine-tuning
> setting is never programmed: max_num_of_fine_tuning_iterations_at_8gt
> in K_EQUTUNING_033_028 resets to 0, so equalization only selects a
> preset and never fine-tunes the transmitter coefficients for the
> channel, leaving the link with marginal signal quality.
>
> Fix this by programming one fine-tuning iteration on the upstream port
> and downstream ports 1 and 2 at power-on, so that 8 GT/s equalization
> adapts the transmitter coefficients to the channel. With this setting
> the links no longer report any AER errors.
>
> Signed-off-by: Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
> ---
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning
2026-11-19 11:27 [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning Abhishek Kumar
2026-11-19 11:32 ` sashiko-bot
2026-11-19 13:12 ` Bartosz Golaszewski
@ 2026-11-20 16:55 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2026-11-20 16:55 UTC (permalink / raw)
To: Abhishek Kumar
Cc: Bartosz Golaszewski, Manivannan Sadhasivam, Bjorn Helgaas,
linux-pci, krishna.chundru
On Thu, Nov 19, 2026 at 04:57:12PM +0530, Abhishek Kumar wrote:
> On some boots, links on the PCIe switch report a continuous flood of
> correctable AER errors (RxErr, BadTLP and Replay Timer Timeout) at
> 8 GT/s. This happens because the 8 GT/s equalization fine-tuning
> setting is never programmed: max_num_of_fine_tuning_iterations_at_8gt
> in K_EQUTUNING_033_028 resets to 0, so equalization only selects a
> preset and never fine-tunes the transmitter coefficients for the
> channel, leaving the link with marginal signal quality.
>
> Fix this by programming one fine-tuning iteration on the upstream port
> and downstream ports 1 and 2 at power-on, so that 8 GT/s equalization
> adapts the transmitter coefficients to the channel. With this setting
> the links no longer report any AER errors.
>
> Signed-off-by: Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
Applied to pci/pwrctrl for v7.5, thank you!
I added "Toshiba TC9563" to the commit log because this applies to
only this device, not PCIe switches in general.
> ---
> drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> index 4091a2f30aa7..d27b009430f1 100644
> --- a/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> +++ b/drivers/pci/pwrctrl/pci-pwrctrl-tc9563.c
> @@ -29,6 +29,9 @@
> #define TC9563_PORT_L0S_DELAY 0x82496c
> #define TC9563_PORT_L1_DELAY 0x824970
>
> +#define TC9563_K_EQUTUNING_033_028 0x824a10
> +#define TC9563_EQ_FINE_TUNING_ITER 1
> +
> #define TC9563_EMBEDDED_ETH_DELAY 0x8200d8
> #define TC9563_ETH_L1_DELAY_MASK GENMASK(27, 18)
> #define TC9563_ETH_L1_DELAY_VALUE(x) FIELD_PREP(TC9563_ETH_L1_DELAY_MASK, x)
> @@ -346,6 +349,20 @@ static int tc9563_pwrctrl_set_nfts(struct tc9563_pwrctrl *tc9563,
> ARRAY_SIZE(nfts_seq));
> }
>
> +static int tc9563_pwrctrl_set_eq_fine_tuning(struct tc9563_pwrctrl *tc9563)
> +{
> + int ret;
> +
> + ret = regmap_write(tc9563->regmap, TC9563_PORT_SELECT,
> + BIT(TC9563_USP) | BIT(TC9563_DSP1) |
> + BIT(TC9563_DSP2));
> + if (ret)
> + return ret;
> +
> + return regmap_write(tc9563->regmap, TC9563_K_EQUTUNING_033_028,
> + TC9563_EQ_FINE_TUNING_ITER);
> +}
> +
> static int tc9563_pwrctrl_assert_deassert_reset(struct tc9563_pwrctrl *tc9563,
> bool deassert)
> {
> @@ -557,6 +574,12 @@ static int tc9563_pwrctrl_power_on(struct pci_pwrctrl *pwrctrl)
> if (ret)
> goto power_off;
>
> + ret = tc9563_pwrctrl_set_eq_fine_tuning(tc9563);
> + if (ret) {
> + dev_err(dev, "Failed to enable 8 GT/s EQ fine-tuning\n");
> + goto power_off;
> + }
> +
> for (i = 0; i < TC9563_MAX; i++) {
> cfg = &tc9563->cfg[i];
> ret = tc9563_pwrctrl_disable_port(tc9563, i);
>
> ---
> base-commit: e8017d29067fd1310a65c3494ce1a1b492adbac6
> change-id: 20261119-tc9563_fine_tune-1fee86f2e4a3
>
> Best regards,
> --
> Abhishek Kumar <abhishek.kumar15@oss.qualcomm.com>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-11-20 16:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-19 11:27 [PATCH] PCI/pwrctrl: tc9563: Enable 8 GT/s equalization fine-tuning Abhishek Kumar
2026-11-19 11:32 ` sashiko-bot
2026-11-19 13:12 ` Bartosz Golaszewski
2026-11-20 16:55 ` Bjorn Helgaas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.