All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: jens.glathe@oldschoolsolutions.biz
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Abel Vesa <abelvesa@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Sebastian Reichel <sre@kernel.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, stable@vger.kernel.org,
	"Dr. David Alan Gilbert" <dave@treblig.org>,
	Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: Re: [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs
Date: Fri, 18 Sep 2026 11:55:57 +0200	[thread overview]
Message-ID: <aq0Krd3M5u2pbbYZ@black.igk.intel.com> (raw)
In-Reply-To: <20260916-ps883x-disable-usb4-v3-2-8f19386456d0@oldschoolsolutions.biz>

On Wed, Sep 16, 2026 at 09:36:33PM +0200, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
> 
> The connection-status registers need time to propagate through the
> analog front-end (PLLs, lane training) after they are written. A 30 ms
> delay after ps883x_configure() brings DisplayPort Alt Mode hotplug on
> the Lenovo 40B0 to a reliable success rate.
> 
> Tested with T14s G6 and IdeaCentre Mini with the 40B0 dock on the HDMI
> port with a Type-C host cable. Qualcomm firmware that programs this
> retimer from an MCU uses a similar post-config delay.
> 
> Assisted-by: Grok(xAI):4.6
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>

Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/mux/ps883x.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/usb/typec/mux/ps883x.c b/drivers/usb/typec/mux/ps883x.c
> index a5696aef054ee..15aee1d613b1a 100644
> --- a/drivers/usb/typec/mux/ps883x.c
> +++ b/drivers/usb/typec/mux/ps883x.c
> @@ -7,6 +7,7 @@
>  
>  #include <drm/bridge/aux-bridge.h>
>  #include <linux/clk.h>
> +#include <linux/delay.h>
>  #include <linux/gpio/consumer.h>
>  #include <linux/i2c.h>
>  #include <linux/kernel.h>
> @@ -184,6 +185,15 @@ static int ps883x_configure(struct ps883x_retimer *retimer, int cfg0,
>  		return ret;
>  	}
>  
> +	/*
> +	 * The retimer needs time after the connection-status registers are
> +	 * written for the analog front-end (PLLs, lane training) to settle.
> +	 * Without this, DisplayPort Alt Mode hotplug is unreliable on some
> +	 * docks (e.g. Lenovo 40B0). Qualcomm firmware on platforms that
> +	 * program this chip from an MCU uses a similar post-config delay.
> +	 */
> +	fsleep(30000);
> +
>  	return 0;
>  }
>  
> 
> -- 
> 2.53.0
> 

-- 
heikki

  reply	other threads:[~2026-09-18  9:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-16 19:36 [PATCH v3 0/3] usb: typec: ps883x: fixes for older Thunderbolt 4 / USB4 docks Jens Glathe via B4 Relay
2026-09-16 19:36 ` Jens Glathe
2026-09-16 19:36 ` [PATCH v3 1/3] usb: typec: mux: ps883x: support TYPEC_DP_STATE_F Jens Glathe via B4 Relay
2026-09-16 19:36   ` Jens Glathe
2026-09-18  9:55   ` Heikki Krogerus
2026-09-16 19:36 ` [PATCH v3 2/3] usb: typec: mux: ps883x: add a delay after writing config regs Jens Glathe via B4 Relay
2026-09-16 19:36   ` Jens Glathe
2026-09-18  9:55   ` Heikki Krogerus [this message]
2026-09-16 19:36 ` [PATCH v3 3/3] usb: typec: mux: ps883x: disable USB4 on incomplete USB4 platforms Jens Glathe via B4 Relay
2026-09-16 19:36   ` Jens Glathe
2026-09-18  9:56   ` Heikki Krogerus

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=aq0Krd3M5u2pbbYZ@black.igk.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=abelvesa@kernel.org \
    --cc=andersson@kernel.org \
    --cc=dave@treblig.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jens.glathe@oldschoolsolutions.biz \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sre@kernel.org \
    --cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.