linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] usb: typec: ucsi: add workaround for several Qualcomm platforms
@ 2023-10-25 11:49 Dmitry Baryshkov
  2023-10-25 11:49 ` [PATCH v2 1/2] usb: typec: ucsi: fix UCSI on buggy Qualcomm devices Dmitry Baryshkov
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Dmitry Baryshkov @ 2023-10-25 11:49 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Neil Armstrong
  Cc: Rob Herring, linux-usb, linux-arm-msm

The UCSI firmware on Qualcomm SC8180X, SC8280XP and SM8350 are buggy.
Submitting UCSI_GET_PDOS command for partners which do not actually
support PD and do not have PDOs causes firmware to crash, preventing
further UCSI activity. Firmware on newer platforms have fixed this
issue. In order to still be able to use UCSI functionality on the
mentioned platforms (e.g. to be able to handle USB role switching),
apply a workaround that completely shortcuts UCSI_GET_PDOS command for
the USB-C partner.

This has been tested on sm8350 only, but should apply to other
platforms. I did not enable UCSI for sc8180x yet, it has slightly
different implementation, which I'd like to get tested first.

Note: patch 2 depends on patch 1, otherwise people might end up with the
broken kernel and crashed firmware. The easiest way to handle this
dependency is to merge both patches through the USB tree.

Changes since v1:
- Check parent's compatible in the UCSI driver instead of using
  different AUX device names in the PMIC GLINK driver (Bjorn).

Dmitry Baryshkov (2):
  usb: typec: ucsi: fix UCSI on buggy Qualcomm devices
  soc: qcom: pmic_glink: enable UCSI by default

 drivers/soc/qcom/pmic_glink.c       | 19 +++++++++----------
 drivers/usb/typec/ucsi/ucsi.c       |  3 +++
 drivers/usb/typec/ucsi/ucsi.h       |  3 +++
 drivers/usb/typec/ucsi/ucsi_glink.c | 13 +++++++++++++
 4 files changed, 28 insertions(+), 10 deletions(-)

-- 
2.42.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-12-08 14:51 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25 11:49 [PATCH v2 0/2] usb: typec: ucsi: add workaround for several Qualcomm platforms Dmitry Baryshkov
2023-10-25 11:49 ` [PATCH v2 1/2] usb: typec: ucsi: fix UCSI on buggy Qualcomm devices Dmitry Baryshkov
2023-10-25 12:03   ` Neil Armstrong
2023-10-30  9:06   ` Heikki Krogerus
2023-10-25 11:49 ` [PATCH v2 2/2] soc: qcom: pmic_glink: enable UCSI by default Dmitry Baryshkov
2023-10-25 12:03   ` Neil Armstrong
2023-12-08  8:40 ` [PATCH v2 0/2] usb: typec: ucsi: add workaround for several Qualcomm platforms Johan Hovold
2023-12-08 10:58   ` Dmitry Baryshkov
2023-12-08 11:10     ` Johan Hovold
2023-12-08 11:10       ` Dmitry Baryshkov
2023-12-08 11:48         ` Johan Hovold
2023-12-08 12:16           ` Dmitry Baryshkov
2023-12-08 12:26             ` Johan Hovold
2023-12-08 12:27               ` Dmitry Baryshkov
2023-12-08 14:55 ` Bjorn Andersson

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).