From: Devarsh Thakkar <devarsht@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: <sakari.ailus@linux.intel.com>, <u.kleine-koenig@baylibre.com>,
<vigneshr@ti.com>, <aradhya.bhatia@linux.dev>, <s-jain1@ti.com>,
<r-donadkar@ti.com>, <vkoul@kernel.org>, <kishon@kernel.org>,
<mripard@kernel.org>, <linux-phy@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/2] phy: cadence: cdns-dphy: Fix PLL lock and O_CMN_READY polling
Date: Fri, 20 Jun 2025 20:37:00 +0530 [thread overview]
Message-ID: <e19bb1d6-307c-4ed4-b353-5d2e0668f6fb@ti.com> (raw)
In-Reply-To: <218ba1a0-068d-4bb2-bba2-2739afa7f470@ideasonboard.com>
Hi,
On 18/06/25 15:31, Tomi Valkeinen wrote:
> Hi,
>
> On 02/05/2025 06:34, Devarsh Thakkar wrote:
>> PLL lockup and O_CMN_READY assertion can only happen after common state
>> machine gets enabled (by programming DPHY_CMN_SSM register), but driver was
>> polling them before the common state machine was enabled. To fix this :
>>
>> - Add new function callbacks for polling on PLL lock and O_CMN_READY
>> assertion.
>> - As state machine and clocks get enabled in power_on callback only, move
>> the clock related programming part from configure callback to power_on
>> callback and poll for the PLL lockup and O_CMN_READY assertion after
>> state machine gets enabled.
>> - The configure callback only saves the PLL configuration received from the
>> client driver which will be applied later on in power_on callback.
>> - Add checks to ensure configure is called before power_on and state
>> machine is in disabled state before power_on callback is called.
>> - Disable state machine in power_off so that client driver can
>> re-configure the PLL by following up a power_off, configure, power_on
>> sequence.
>>
>> Cc: stable@vger.kernel.org
>> Fixes: 7a343c8bf4b5 ("phy: Add Cadence D-PHY support")
>> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
>> ---
>> V3:
>> - Move out clock programming logic to power_on as PLL polling and enable
>> can happen only after SSM enable
>> - Disable state machine on power off
>>
>> V2:
>> - Return error code on polling timeout
>> - Moved out calibration logic to separate patch
>>
>> drivers/phy/cadence/cdns-dphy.c | 109 +++++++++++++++++++++++++-------
>> 1 file changed, 85 insertions(+), 24 deletions(-)
>>
>> diff --git a/drivers/phy/cadence/cdns-dphy.c b/drivers/phy/cadence/cdns-dphy.c
>> index ed87a3970f83..a94109a63788 100644
>> --- a/drivers/phy/cadence/cdns-dphy.c
>> +++ b/drivers/phy/cadence/cdns-dphy.c
>> @@ -79,6 +79,7 @@ struct cdns_dphy_cfg {
>> u8 pll_ipdiv;
>> u8 pll_opdiv;
>> u16 pll_fbdiv;
>> + u64 hs_clk_rate;
>
> This has a minor conflict with my cdns-dsi series, as I also add
> hs_clk_rate but as u32. Also, applying both serieses,
> cdns_dphy_config_from_opts() becomes odd as the hs_clk_rate will be
> assigned back and forth between opts and cfg. Can you check this?
Understood. I think after re-basing on top of your patch, I don't need
to assign cfg->hs_clk_rate in cdns_dphy_config_from_opts since you
already assigned it to realized clock value in
cdns_dsi_get_dphy_pll_cfg. I can rebase on top of your series.
Regards
Devarsh
next prev parent reply other threads:[~2025-06-20 15:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-02 3:34 [PATCH v3 0/2] Fix PLL lock timeout and calibration wait time Devarsh Thakkar
2025-05-02 3:34 ` [PATCH v3 1/2] phy: cadence: cdns-dphy: Fix PLL lock and O_CMN_READY polling Devarsh Thakkar
2025-05-14 10:29 ` Vinod Koul
2025-06-20 14:41 ` Devarsh Thakkar
2025-05-26 10:59 ` Tomi Valkeinen
2025-06-20 14:35 ` Devarsh Thakkar
2025-06-20 15:08 ` Devarsh Thakkar
2025-06-18 10:01 ` Tomi Valkeinen
2025-06-20 15:07 ` Devarsh Thakkar [this message]
2025-05-02 3:34 ` [PATCH v3 2/2] phy: cadence: cdns-dphy: Update calibration wait time for startup state machine Devarsh Thakkar
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=e19bb1d6-307c-4ed4-b353-5d2e0668f6fb@ti.com \
--to=devarsht@ti.com \
--cc=aradhya.bhatia@linux.dev \
--cc=kishon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=mripard@kernel.org \
--cc=r-donadkar@ti.com \
--cc=s-jain1@ti.com \
--cc=sakari.ailus@linux.intel.com \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=vigneshr@ti.com \
--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 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®