From: sashiko-bot@kernel.org
To: "Jason Yang" <jason98166@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v9 04/10] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers
Date: Fri, 04 Dec 2026 03:31:50 +0000 [thread overview]
Message-ID: <sashiko-outbox-249053@kernel.org> (raw)
In-Reply-To: <20261204-dcphy-rx-v1-v9-4-fad1cfe7f536@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: rockchip-samsung-dcphy: clear PLL SSC state and SSCG_EN
below 2.5 Gbps
--
commit 1503524fe645c160460f272aa74ab178cc242be5
Author: Jason Yang <jason98166@gmail.com>
phy: rockchip-samsung-dcphy: Always write the rate-dependent registers
This commit updates samsung_mipi_dphy_clk_lane_timing_init() and
samsung_mipi_dphy_data_lane_timing_init() to unconditionally write the
rate-dependent ANA_CON1 and DPHY_MC_DESKEW_CON0 registers, programming
zero when below their data rate thresholds.
> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> index ce1bc62497c50..7a009d87a6656 100644
> --- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> @@ -1228,7 +1228,10 @@ samsung_mipi_dphy_clk_lane_timing_init(struct samsung_mipi_dcphy *samsung)
> regmap_write(samsung->regmap, DPHY_MC_ANA_CON0, val);
>
> if (lane_hs_rate >= 4500)
> - regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, 0x0001);
> + val = 0x0001;
> + else
> + val = 0;
> + regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, val);
[Severity: Medium]
Should samsung_mipi_dcphy_pll_configure() also clear SSCG_EN in PLL_CON4
when SSC is disabled?
samsung_mipi_dphy_power_on() calls samsung_mipi_dcphy_pll_configure()
right before the lane timing helpers, where PLL_CON3 and PLL_CON4 are
only written when samsung->pll.ssc_en is true:
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c:samsung_mipi_dcphy_pll_configure() {
...
if (samsung->pll.ssc_en) {
regmap_write(samsung->regmap, PLL_CON3,
MRR(samsung->pll.mrr) | MFR(samsung->pll.mfr));
regmap_update_bits(samsung->regmap, PLL_CON4, SSCG_EN, SSCG_EN);
}
...
}
In addition, samsung_mipi_dcphy_pll_calc_rate() sets samsung->pll.ssc_en
to true when fout > 2500000000LL and
samsung_mipi_dcphy_pll_ssc_modulation_calc() succeeds, but never resets it
to false for lower rates or on calculation failure.
When a DSI2 modeset on RK3588 transitions from above 2.5 Gbps down to
2.5 Gbps or below, SSC remains enabled with stale mfr/mrr values from the
previous PLL configuration, risking incorrect clock modulation or link
instability once the APB reset moves out of power_on().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-dcphy-rx-v1-v9-0-fad1cfe7f536@gmail.com?part=4
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
WARNING: multiple messages have this Message-ID (diff)
From: sashiko-bot@kernel.org
To: "Jason Yang" <jason98166@gmail.com>
Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, vkoul@kernel.org,
neil.armstrong@linaro.org, olteanv@gmail.com
Subject: Re: [PATCH v9 04/10] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers
Date: Fri, 04 Dec 2026 03:31:50 +0000 [thread overview]
Message-ID: <sashiko-outbox-249053@kernel.org> (raw)
In-Reply-To: <20261204-dcphy-rx-v1-v9-4-fad1cfe7f536@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: rockchip-samsung-dcphy: clear PLL SSC state and SSCG_EN
below 2.5 Gbps
--
commit 1503524fe645c160460f272aa74ab178cc242be5
Author: Jason Yang <jason98166@gmail.com>
phy: rockchip-samsung-dcphy: Always write the rate-dependent registers
This commit updates samsung_mipi_dphy_clk_lane_timing_init() and
samsung_mipi_dphy_data_lane_timing_init() to unconditionally write the
rate-dependent ANA_CON1 and DPHY_MC_DESKEW_CON0 registers, programming
zero when below their data rate thresholds.
> diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> index ce1bc62497c50..7a009d87a6656 100644
> --- a/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c
> @@ -1228,7 +1228,10 @@ samsung_mipi_dphy_clk_lane_timing_init(struct samsung_mipi_dcphy *samsung)
> regmap_write(samsung->regmap, DPHY_MC_ANA_CON0, val);
>
> if (lane_hs_rate >= 4500)
> - regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, 0x0001);
> + val = 0x0001;
> + else
> + val = 0;
> + regmap_write(samsung->regmap, DPHY_MC_ANA_CON1, val);
[Severity: Medium]
Should samsung_mipi_dcphy_pll_configure() also clear SSCG_EN in PLL_CON4
when SSC is disabled?
samsung_mipi_dphy_power_on() calls samsung_mipi_dcphy_pll_configure()
right before the lane timing helpers, where PLL_CON3 and PLL_CON4 are
only written when samsung->pll.ssc_en is true:
drivers/phy/rockchip/phy-rockchip-samsung-dcphy.c:samsung_mipi_dcphy_pll_configure() {
...
if (samsung->pll.ssc_en) {
regmap_write(samsung->regmap, PLL_CON3,
MRR(samsung->pll.mrr) | MFR(samsung->pll.mfr));
regmap_update_bits(samsung->regmap, PLL_CON4, SSCG_EN, SSCG_EN);
}
...
}
In addition, samsung_mipi_dcphy_pll_calc_rate() sets samsung->pll.ssc_en
to true when fout > 2500000000LL and
samsung_mipi_dcphy_pll_ssc_modulation_calc() succeeds, but never resets it
to false for lower rates or on calculation failure.
When a DSI2 modeset on RK3588 transitions from above 2.5 Gbps down to
2.5 Gbps or below, SSC remains enabled with stale mfr/mrr values from the
previous PLL configuration, risking incorrect clock modulation or link
instability once the APB reset moves out of power_on().
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-dcphy-rx-v1-v9-0-fad1cfe7f536@gmail.com?part=4
next prev parent reply other threads:[~2026-12-04 3:31 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 3:18 [PATCH v9 00/10] phy: rockchip-samsung-dcphy: Add the MIPI D-PHY receiver Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 01/10] dt-bindings: phy: Add PHY_DIRECTION_TX/RX definitions Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 02/10] dt-bindings: phy: rockchip,rk3588-mipi-dcphy: Select TX or RX, add phy-type Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 03/10] phy: rockchip-samsung-dcphy: Unwind power-on on PLL lock failure Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 04/10] phy: rockchip-samsung-dcphy: Always write the rate-dependent registers Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:31 ` sashiko-bot [this message]
2026-12-04 3:31 ` sashiko-bot
2026-12-04 3:18 ` [PATCH v9 05/10] phy: rockchip-samsung-dcphy: Move block-level setup to runtime resume Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:39 ` sashiko-bot
2026-12-04 3:39 ` sashiko-bot
2026-12-04 3:18 ` [PATCH v9 06/10] phy: rockchip-samsung-dcphy: Explicitly request exclusive reset controls Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 07/10] phy: rockchip-samsung-dcphy: Name the transmitter helpers and ops Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 08/10] phy: rockchip-samsung-dcphy: Support the new phy-type and direction binding Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` [PATCH v9 09/10] phy: rockchip-samsung-dcphy: Add MIPI D-PHY receiver support Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:18 ` Jason Yang
2026-12-04 3:35 ` sashiko-bot
2026-12-04 3:35 ` sashiko-bot
2026-12-04 3:19 ` [PATCH v9 10/10] arm64: dts: rockchip: add the dcphy mipi csi-2 receiver nodes to rk3588 Jason Yang
2026-12-04 3:19 ` Jason Yang
2026-12-04 3:19 ` Jason Yang
2026-12-04 23:01 ` [PATCH v9 00/10] phy: rockchip-samsung-dcphy: Add the MIPI D-PHY receiver Sebastian Reichel
2026-12-04 23:01 ` Sebastian Reichel
2026-12-04 23:01 ` Sebastian Reichel
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=sashiko-outbox-249053@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jason98166@gmail.com \
--cc=linux-phy@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=olteanv@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vkoul@kernel.org \
/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 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.