public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Johan Hovold <johan+linaro@kernel.org>,
	Vinod Koul <vkoul@kernel.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 17/22] phy: qcom-qmp-combo: merge USB and DP configurations
Date: Mon, 14 Nov 2022 11:57:04 +0100	[thread overview]
Message-ID: <Y3IfAEhpPRLnFRhr@hovoldconsulting.com> (raw)
In-Reply-To: <8802255c-16a9-1fb7-bbc5-d8e0d44a6f1f@linaro.org>

On Mon, Nov 14, 2022 at 01:10:43PM +0300, Dmitry Baryshkov wrote:
> On 14/11/2022 11:54, Johan Hovold wrote:
> > On Sat, Nov 12, 2022 at 10:43:14AM +0300, Dmitry Baryshkov wrote:
> >> On 11/11/2022 11:56, Johan Hovold wrote:
> >>> It does not really make any sense to keep separate configuration
> >>> structures for the USB and DP parts of the same PHY so merge them.
   
> >>> -/* struct qmp_phy_cfg - per-PHY initialization config */
> >>>    struct qmp_phy_cfg {
> >>> -	/* phy-type - PCIE/UFS/USB */
> >>> -	unsigned int type;
> >>>    	int lanes;
> >>
> >> int lanes doesn't really make sense here in my opinion. It should be
> >> usb_lanes and dp_lanes.
> > 
> > It doesn't make much less sense than having it here currently do.
> > 
> > All of these USB-C PHYs are dual lane for bi-directional SS USB and
> > quad lane for uni-directional DP (even if only CC1 orientation and lanes
> > 2 and 3 are currently supported).
> 
> I was under impression that sdm845 has just a single lane for each of 
> USB and DP. After rechecking the phy/next, I see that it was my mistake 
> (quite logical, SS is two lanes, so the compliant PHY must have two 
> lanes too).
> 
> I wander how/if 4-lane DP works. The only thing that we do is 
> programming of the QSERDES_DP_PHY_PD_CTL register, however judging e.g. 
> your 4-lane PCIe changes, one should probably also program the other two 
> lanes. Maybe it is handled automatically inside the hardware.

4-lane PCIe on SC8280XP is a different thing entirely (and remember that
that's actually 8 uni-directional lanes).

I'm sure there are further problems with the current DP alt mode
implementation, but hopefully that can be resolved when adding support
for orientation detection. I'm just fixing the obvious bugs and try to
stay "bug compatible" otherwise. :)

> > I should probably just drop the lanes parameter completely, either as a
> > preparatory clean up or as follow-on one (e.g. also a bit depending on
> > if there are other reasons for respinning a v2).
> 
> I think a follow up is enough, but let's get it. Having a single lanes=2 
> field looks... strange.

I dropped the lane parameter as a preparatory patch to this one in v2
that I'll post in a bit.

Johan

  reply	other threads:[~2022-11-14 10:57 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11  8:56 [PATCH 00/22] phy: qcom-qmp-combo: preparatory cleanups (set 2/3) Johan Hovold
2022-11-11  8:56 ` [PATCH 01/22] phy: qcom-qmp-combo: sort device-id table Johan Hovold
2022-11-12  6:18   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 02/22] phy: qcom-qmp-combo: move " Johan Hovold
2022-11-12  6:18   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 03/22] phy: qcom-qmp-combo: move pm ops Johan Hovold
2022-11-12  6:19   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 04/22] phy: qcom-qmp-combo: rename PHY ops structures Johan Hovold
2022-11-12  6:19   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 05/22] phy: qcom-qmp-combo: drop unused DP PHY mode op Johan Hovold
2022-11-12  6:19   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 06/22] phy: qcom-qmp-combo: rename USB PHY ops Johan Hovold
2022-11-12  6:20   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 07/22] phy: qcom-qmp-combo: drop unnecessary debug message Johan Hovold
2022-11-12  6:20   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 08/22] phy: qcom-qmp-combo: separate USB and DP init ops Johan Hovold
2022-11-12  6:21   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 09/22] phy: qcom-qmp-combo: rename DP PHY ops Johan Hovold
2022-11-12  6:21   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 10/22] phy: qcom-qmp-combo: separate USB and DP power-on ops Johan Hovold
2022-11-12  7:32   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 11/22] phy: qcom-qmp-combo: clean up serdes initialisation Johan Hovold
2022-11-12  7:33   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 12/22] phy: qcom-qmp-combo: separate USB and DP devicetree parsing Johan Hovold
2022-11-12  7:50   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 13/22] phy: qcom-qmp-combo: add dedicated DP iomem pointers Johan Hovold
2022-11-12  7:36   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 14/22] phy: qcom-qmp-combo: clean up DP configurations Johan Hovold
2022-11-12  7:32   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 15/22] phy: qcom-qmp-combo: rename sc8280xp config Johan Hovold
2022-11-12  7:33   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 16/22] phy: qcom-qmp-combo: add DP configuration tables Johan Hovold
2022-11-12  7:39   ` Dmitry Baryshkov
2022-11-14  8:38     ` Johan Hovold
2022-11-14  9:49       ` Dmitry Baryshkov
2022-11-14  9:50       ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 17/22] phy: qcom-qmp-combo: merge USB and DP configurations Johan Hovold
2022-11-12  7:43   ` Dmitry Baryshkov
2022-11-14  8:54     ` Johan Hovold
2022-11-14 10:10       ` Dmitry Baryshkov
2022-11-14 10:57         ` Johan Hovold [this message]
2022-11-14 10:11   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 18/22] phy: qcom-qmp-combo: merge driver data Johan Hovold
2022-11-12  7:46   ` Dmitry Baryshkov
2022-11-14  9:01     ` Johan Hovold
2022-11-14  9:22       ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 19/22] phy: qcom-qmp-combo: clean up device-tree parsing Johan Hovold
2022-11-12  7:48   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 20/22] phy: qcom-qmp-combo: clean up probe initialisation Johan Hovold
2022-11-12  7:48   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 21/22] phy: qcom-qmp-combo: clean up PHY init Johan Hovold
2022-11-12  7:49   ` Dmitry Baryshkov
2022-11-11  8:56 ` [PATCH 22/22] phy: qcom-qmp-combo: clean up DP callback names Johan Hovold
2022-11-12  7:49   ` Dmitry Baryshkov

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=Y3IfAEhpPRLnFRhr@hovoldconsulting.com \
    --to=johan@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=johan+linaro@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.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