public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: vkoul@kernel.org, kishon@ti.com, agross@kernel.org,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	robh+dt@kernel.org, jonathan@marek.ca,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Wesley Cheng <wcheng@codeaurora.org>
Subject: Re: [PATCH 2/2] phy: qcom-qmp: Register as a typec switch for orientation detection
Date: Tue, 6 Jul 2021 17:50:23 -0700	[thread overview]
Message-ID: <YOT6T3YZSz1EysuO@ripper> (raw)
In-Reply-To: <9f213505-c118-b6fd-676b-1bafd83d8380@linaro.org>

On Tue 06 Jul 17:35 PDT 2021, Bryan O'Donoghue wrote:

> On 07/07/2021 01:00, Bjorn Andersson wrote:
> > In order to perform link training on 4 lanes we need to reset the
> > PHY_MODE_CTRL with only DP_MODE.
> 
> We're only the two lanes for USB on sm8250 and at the moment only USB works
> - not dp on 8250.
> 
> Perhaps you've discovered why the DP times out on 8250..
> 

The way this problem manifest itself in my testing (on sc8180x) is that
the 3rd lane fails to complete link training, although it wasn't
completely obvious from the kernel prints until you look at the
implementation.

I don't know if you're still struggling with the AUX timeout, but if
you're past that this would be a strong candidate. That said, if you set
data-lanes = <0 1> in your DP node then it won't attempt to go 4 lanes
and wouldn't hit this problem.

> > In my efforts on sc8180x I skipped the disable/enable in switch_set() (I
> > believe because I didn't have the init_count check...) and then in
> > qcom_qmp_phy_configure_dp_mode() I issue a reset when we're heading to 4
> > lanes. Perhaps we can do the disable/enable and achieve the same thing,
> > but as written here you won't get 4 lanes...
> > 
> > I will do some more testing.
> 
> Do you have a commit I can cherry pick ? Might be worth testing out with
> tcpm + dp on the sm8250 if its working for you on sc8180x
> 

I dumped my hack-branch on github a while ago and have been working on
cleaning this up to get the patches out:

https://github.com/andersson/kernel/commits/wip/sc8180x-edp-dp-nvme-sdx55-dump

Unfortunately I extended my testing and realized that DPMS doesn't work
reliably.

With my MST hub (and single monitor) I often hit a security violation
when accessing REG_DP_STATE_CTRL when powering down the display, unless
I have drm.debug=511 (i.e. changing the timing of things). With the more
favourable timing DPMS on/off works nicely.

With my direct type-c/dp cable I can reliably power down the display,
but resuming it generally fails immediately - the monitor is waking up,
and then goes back to sleep (probably because the software has given up
on me already).

Trying to debug these two issues currently.

Connecting, disconnecting and reconnecting the cable works reliably
though, so once upstream boots again I intend to send out most of my
cleaned up patches.

Regards,
Bjorn

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

      reply	other threads:[~2021-07-07  0:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 23:07 [PATCH 0/2] pm8150b qmp phy type-c orientation fixes Bryan O'Donoghue
2021-07-06 23:07 ` [PATCH 1/2] arm64: dts: qcom: sm8250: fix usb2 qmp phy node Bryan O'Donoghue
2021-07-06 23:26   ` Dmitry Baryshkov
2021-07-06 23:29     ` Bryan O'Donoghue
2021-07-07  0:04   ` Bjorn Andersson
2021-07-07  0:10     ` Bryan O'Donoghue
2021-07-06 23:07 ` [PATCH 2/2] phy: qcom-qmp: Register as a typec switch for orientation detection Bryan O'Donoghue
2021-07-07  0:00   ` Bjorn Andersson
2021-07-07  0:35     ` Bryan O'Donoghue
2021-07-07  0:50       ` Bjorn Andersson [this message]

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=YOT6T3YZSz1EysuO@ripper \
    --to=bjorn.andersson@linaro.org \
    --cc=agross@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=jonathan@marek.ca \
    --cc=kishon@ti.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wcheng@codeaurora.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