Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Devarsh Thakkar <devarsht@ti.com>
To: Jai Luthra <jai.luthra@ideasonboard.com>
Cc: <vkoul@kernel.org>, <kishon@kernel.org>, <mripard@kernel.org>,
	<linux-phy@lists.infradead.org>, <linux-kernel@vger.kernel.org>,
	<sakari.ailus@linux.intel.com>, <vigneshr@ti.com>,
	<aradhya.bhatia@linux.dev>, <s-jain1@ti.com>, <r-donadkar@ti.com>,
	<tomi.valkeinen@ideasonboard.com>, <j-choudhary@ti.com>,
	<h-shenoy@ti.com>, <praneeth@ti.com>, <u-kumar1@ti.com>
Subject: Re: [PATCH] phy: cadence: cdns-dphy: Fix PLL lock and common ready poll timeout
Date: Mon, 3 Feb 2025 13:29:59 +0530	[thread overview]
Message-ID: <c49f1741-d03a-08f2-ddb1-3b0462a67790@ti.com> (raw)
In-Reply-To: <gvqa3g7cv2di3je2q3xiojkzrfedlh2ugqrtnh5vagbtvo5w3a@a42vb32ds74s>

Hi Jai,

On 30/12/24 19:12, Jai Luthra wrote:
> Hi Devarsh,
> 
> Thanks for the patch, must have been a fun debug :)
> 

Thanks for the review. Oh yeah indeed :).

<snip>
>> 1) PLL lockup and O_CMN_READY assertion can only happen after common state
>>    machine gets enabled, 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 and call them only after
>>    common state machine gets enabled.
>>
>> 2) The cadence DPHY IP registers (as described in J721E TRM [2]) has
>>    default reset values for register fields in some of the registers
>>    which were getting reset to 0 as driver was not preserving them and
>>    overwriting those bits to 0 while updating the registers thus impacting
>>    the overall PLL lockup time. For e.g. DPHY_TX_CMN0_CMN_DIG_TBIT2 has
>>    bits 1-8 used for PLL wait time calibrations with default value as 0x14h
>>    and DPHY_TX_CMN0_CMN_DIG_TBIT10 has bits 27-20 used for PWM Byteclock
>>    divider which is default set to 0x8. To avoid resetting these register
>>    bit-fields, perform read-modify-write while updating above registers.
> 
> IMHO these are separate changes, and thus should be separate patches, 
> even if they are both done to reduce the time spent in the wait loop.
> 
> Ideally first patch to fix (2) across the driver, checking if there are 
> any other registers with default values that are being overwritten.
> 
> And the second patch to fix (1)

Yes that sounds like a good idea indeed. Will fix this in V2 and re-spin.

Regards
Devarsh

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2025-02-03  8:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-30 12:53 [PATCH] phy: cadence: cdns-dphy: Fix PLL lock and common ready poll timeout Devarsh Thakkar
2024-12-30 13:42 ` Jai Luthra
2025-02-03  7:59   ` Devarsh Thakkar [this message]
2025-01-06  8:55 ` Tomi Valkeinen
2025-02-03  8:53   ` 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=c49f1741-d03a-08f2-ddb1-3b0462a67790@ti.com \
    --to=devarsht@ti.com \
    --cc=aradhya.bhatia@linux.dev \
    --cc=h-shenoy@ti.com \
    --cc=j-choudhary@ti.com \
    --cc=jai.luthra@ideasonboard.com \
    --cc=kishon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=mripard@kernel.org \
    --cc=praneeth@ti.com \
    --cc=r-donadkar@ti.com \
    --cc=s-jain1@ti.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=u-kumar1@ti.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