linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <swboyd@chromium.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Kishon Vijay Abraham I <kishon@ti.com>,
	Vinod Koul <vkoul@kernel.org>
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	Jeykumar Sankaran <jsanka@codeaurora.org>,
	Chandan Uddaraju <chandanu@codeaurora.org>,
	Vara Reddy <varar@codeaurora.org>,
	Tanmay Shah <tanmay@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Manu Gautam <mgautam@codeaurora.org>,
	Sandeep Maheswaram <sanm@codeaurora.org>,
	Douglas Anderson <dianders@chromium.org>,
	Sean Paul <seanpaul@chromium.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Jonathan Marek <jonathan@marek.ca>,
	Rob Clark <robdclark@chromium.org>
Subject: Re: [PATCH v1 6/9] phy: qcom-qmp: Add support for DP in USB3+DP combo phy
Date: Thu, 03 Sep 2020 15:55:47 -0700	[thread overview]
Message-ID: <159917374772.334488.3072425606687060968@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <62bdac87-b886-58c1-f071-095ec9945f68@linaro.org>

Quoting Dmitry Baryshkov (2020-09-03 05:37:02)
> On 02/09/2020 04:01, Stephen Boyd wrote:
> > Quoting Dmitry Baryshkov (2020-09-01 06:36:34)
> >> With these functions I'm struggling between introducing
> >> PHY_TYPE_DP_V3/V4 and introducing callbacks into qmp_phy_cfg. What would
> >> you prefer?
> >>
> >> What about the following struct?
> >>
> >> struct qmp_phy_dp_opts {
> >>          void (*dp_aux_init)(struct qmp_phy *qphy);
> >>          void (*dp_configure_tx)(struct qmp_phy *qphy);
> >>          void (*dp_configure_lanes)(struct qmp_phy *qphy);
> >> };
> >>
> >> I'm not sure about dp_calibrate().
> >>
> > 
> > Is there v4 code somewhere that I can see? Another level of indirection
> > is always a solution, so it is probably fine. This driver is currently
> > written with many conditionals instead of function tables so I'm not
> > sure it fits in with the style of how things are done though. The
> > alternative is to use an enum and call different functions?
> 
> Downstream DP driver sources can be found here:
> https://source.codeaurora.org/quic/la/platform/vendor/opensource/display-drivers/tree/msm/dp/dp_catalog_v420.c?h=LA.UM.8.12.r1-13900-sm8250.0
> 
> https://source.codeaurora.org/quic/la/platform/vendor/opensource/display-drivers/tree/pll/dp_pll_7nm_util.c?h=LA.UM.8.12.r1-13900-sm8250.0
> 

Awesome thanks for the pointer.

> > 
> > The calibrate call is there to "turn the crank" on the aux settings.  I
> > need to cycle through the different values for that aux register so that
> > aux can be tuned properly. The AUX channel really has another phy that
> > needs tuning so we're sort of combining the aux and DP link phy together
> > here by letting the calibrate call tune the AUX phy and the configure
> > call tune the DP phy. I don't see any sort of concept of an AUX phy
> > though so this seemed ok. Does v4 need to tune more registers?
> 
> 
> It looks like four values are written to AUX_CFG1:
> 0x20, 0x13, 0x23, 0x1d
> 

Ok, so still just AUX_CFG1 but now some different values. Maybe it
should come from DT if it really differs based on board design. I don't
know if it does though. If it does differ it would be nice to know what
the settings are and if it doesn't just make sense to iterate through
all 256 of them instead of targeting specific ones.

  parent reply	other threads:[~2020-09-03 22:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26  2:47 [PATCH v1 0/9] Support qcom USB3+DP combo phy (or type-c phy) Stephen Boyd
2020-08-26  2:47 ` [PATCH v1 1/9] dt-bindings: phy: qcom,qmp-usb3-dp: Add DP phy information Stephen Boyd
2020-08-26  2:47 ` [PATCH v1 2/9] phy: qcom-qmp: Move phy mode into struct qmp_phy Stephen Boyd
2020-08-26  3:37   ` Bjorn Andersson
2020-08-26  2:47 ` [PATCH v1 3/9] phy: qcom-qmp: Remove 'initialized' in favor of 'init_count' Stephen Boyd
2020-08-26  3:44   ` Bjorn Andersson
2020-08-26  2:47 ` [PATCH v1 4/9] phy: qcom-qmp: Move 'serdes' and 'cfg' into 'struct qcom_phy' Stephen Boyd
2020-08-26  2:47 ` [PATCH v1 5/9] phy: qcom-qmp: Get dp_com I/O resource by index Stephen Boyd
2020-08-26  4:36   ` Bjorn Andersson
2020-08-26 21:32     ` Stephen Boyd
2020-08-27  1:59       ` Bjorn Andersson
2020-08-26  2:47 ` [PATCH v1 6/9] phy: qcom-qmp: Add support for DP in USB3+DP combo phy Stephen Boyd
2020-09-01 13:36   ` Dmitry Baryshkov
2020-09-02  1:01     ` Stephen Boyd
2020-09-03 12:37       ` Dmitry Baryshkov
2020-09-03 12:41         ` Jonathan Marek
2020-09-03 21:35           ` Dmitry Baryshkov
2020-09-03 22:55         ` Stephen Boyd [this message]
2020-08-26  2:47 ` [PATCH v1 7/9] phy: qcom-qmp: Add support for sc7180 DP phy Stephen Boyd
2020-08-26  2:47 ` [PATCH v1 8/9] clk: qcom: dispcc: Update DP clk ops for phy design Stephen Boyd
2020-08-26  2:47 ` [PATCH v1 9/9] drm/msm/dp: Use qmp phy for DP PLL and PHY Stephen Boyd

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=159917374772.334488.3072425606687060968@swboyd.mtv.corp.google.com \
    --to=swboyd@chromium.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=chandanu@codeaurora.org \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=jonathan@marek.ca \
    --cc=jsanka@codeaurora.org \
    --cc=kishon@ti.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgautam@codeaurora.org \
    --cc=robdclark@chromium.org \
    --cc=sanm@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=seanpaul@chromium.org \
    --cc=tanmay@codeaurora.org \
    --cc=varar@codeaurora.org \
    --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;
as well as URLs for NNTP newsgroup(s).