Linux USB
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: taygoth <taygoth@gmail.com>, Sam Day <me@samcday.com>
Cc: Mark Brown <broonie@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Wesley Cheng <quic_wcheng@quicinc.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	Rob Herring <robh@kernel.org>,
	linux-arm-msm@vger.kernel.org,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	linux-usb@vger.kernel.org, Conor Dooley <conor+dt@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	Casey Connolly <casey.connolly@linaro.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 0/6] usb: typec: add Qualcomm PMI8998 USB Type-C role-switch support
Date: Tue, 28 Jul 2026 10:25:46 +0200	[thread overview]
Message-ID: <f19752d4-6f4a-4719-a70d-c1948877dc82@ixit.cz> (raw)
In-Reply-To: <cover.1779127507.git.taygoth@gmail.com>

On 18/05/2026 22:22, taygoth wrote:
> This series adds USB Type-C role-switch support for the PMI8998 PMIC
> used on SDM845 phones (OnePlus 6/6T, Xiaomi Poco F1, SHIFT 6mq), which
> have been locked to USB peripheral mode under mainline kernels until
> now.
> 
> The PMI8998 SMB2 charger block integrates a Type-C detection unit at
> SPMI offset 0x1300 that performs CC sensing, debounce and Rp/Rd
> resolution entirely in hardware. The state is exposed through the
> TYPE_C_STATUS_4 register and reported via a single consolidated
> "type-c-change" interrupt. The new driver reads that status on every
> interrupt and pushes the negotiated role to a usb_role_switch consumer
> (dwc3), enabling automatic peripheral/host switching on cable change.
> Because the hardware handles the Type-C state machine natively, no
> software TCPM port manager is required.
> 
> The Type-C block shares the SMB2 USBIN region with the already
> mainlined qcom_pmi8998-charger driver. The two coexist on the shared
> SPMI regmap without write conflict: the typec driver only reads
> TYPE_C_STATUS_* and touches the IRQ enable bits at offsets
> 0x130b-0x130f and 0x1367-0x1368.
> 
> The PMI8998 USB OTG VBUS boost converter at offset 0x1100 has the
> same CMD_OTG / OTG_CFG / OTG_CURRENT_LIMIT register layout as PM8150B,
> so the existing drivers/regulator/qcom_usb_vbus-regulator can drive it
> through a compatible cascade -- only the DT binding needs the new
> compatible string added.
> 
> Power Delivery is not implemented. The PMI8998 PDPHY block at offset
> 0x1700 is register-identical to PM8150B and could be wired through
> the existing drivers/usb/typec/tcpm/qcom code in a follow-up if PD
> negotiation becomes a requirement.
> 
> Tested-on: OnePlus 6T (sdm845-oneplus-fajita) running Mobian
> 6.12-sdm845. A USB flash drive, USB ethernet adapter, USB WiFi
> adapter (TP-Link Archer T2) and a self-powered USB-C dock with
> downstream ethernet all enumerate through xHCI after the role
> transitions from peripheral to host. Repeat plug/unplug cycles drive
> the role through device -> none -> host -> none -> device cleanly
> with no IRQ stalls or stale role-switch state.
> 

Hello Максим,

1st, let me say happy to hear about progress here, I missed this message - due 
to huge traffic in linux-arm-msm*.

2nd, I have locally version which does work with DisplayPort (SHIFT 6MQ), does 
work with dockstation USB (e.g. perperials are recognized and does work), but 
doesn't provide power to the usb devices (haven't figureout, and it's more 
clanker work than mine here).

3rd, added Sam into +Cc, as he's interested in the pmi8998 too, plus there are 
others doing some experiments with pmi8998 in Matrix room 
https://matrix.to/#/#sdm845:ixit.cz .

What's your current state? Would you be interested joining the room and chat? or 
  we can do some email exchange of trees and work done :)

David


* there is phone-devel@vger.kernel.org, where this type of contribution stand 
out a bit, possibly for next iteration

[...]

      parent reply	other threads:[~2026-07-28  8:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 20:22 [PATCH 0/6] usb: typec: add Qualcomm PMI8998 USB Type-C role-switch support taygoth
2026-05-18 20:22 ` [PATCH 1/6] dt-bindings: regulator: qcom,usb-vbus-regulator: add PMI8998 taygoth
2026-05-18 21:56   ` Bryan O'Donoghue
2026-05-19 10:51   ` Krzysztof Kozlowski
2026-05-18 20:22 ` [PATCH 2/6] dt-bindings: usb: add Qualcomm PMI8998 Type-C controller taygoth
2026-05-18 22:03   ` Dmitry Baryshkov
2026-05-18 20:22 ` [PATCH 3/6] usb: typec: add Qualcomm PMI8998 role-switch driver taygoth
2026-05-18 21:45   ` Dmitry Baryshkov
2026-05-18 22:07     ` Bryan O'Donoghue
2026-05-18 22:09       ` Bryan O'Donoghue
2026-05-19 10:52   ` Krzysztof Kozlowski
2026-05-18 20:22 ` [PATCH 4/6] arm64: dts: qcom: pmi8998: add USB Type-C and VBUS regulator nodes taygoth
2026-05-18 20:22 ` [PATCH 5/6] arm64: dts: qcom: sdm845-oneplus-common: enable USB Type-C role switching taygoth
2026-05-18 20:22 ` [PATCH 6/6] MAINTAINERS: add entry for Qualcomm PMI8998 USB Type-C driver taygoth
2026-05-18 21:59 ` [PATCH 0/6] usb: typec: add Qualcomm PMI8998 USB Type-C role-switch support Bryan O'Donoghue
     [not found]   ` <CAFPzRonyVt9Kd+Sc0ooNz8By6b-Zr_jHr0sBXv-M25dQ0w9Cjg@mail.gmail.com>
2026-05-18 23:43     ` Bryan O'Donoghue
2026-05-20 15:00       ` Dmitry Baryshkov
2026-05-19 11:12 ` Konrad Dybcio
2026-07-28  8:25 ` David Heidelberg [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=f19752d4-6f4a-4719-a70d-c1948877dc82@ixit.cz \
    --to=david@ixit.cz \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=casey.connolly@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=me@samcday.com \
    --cc=quic_wcheng@quicinc.com \
    --cc=robh@kernel.org \
    --cc=taygoth@gmail.com \
    /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