From: sashiko-bot@kernel.org
To: taygoth <taygoth@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 5/6] arm64: dts: qcom: sdm845-oneplus-common: enable USB Type-C role switching
Date: Mon, 18 May 2026 21:36:43 +0000 [thread overview]
Message-ID: <20260518213644.50880C2BCB7@smtp.kernel.org> (raw)
In-Reply-To: <ba3804796cc651aa281deab49234ca52cfdd3696.1779127507.git.taygoth@gmail.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] Removing `maximum-speed = "high-speed"` misconfigures the DWC3 controller to default to SuperSpeed on a physically High-Speed-only board, leading to false capabilities advertisement and potential AXI bus hangs.
- [High] The `vdd-vbus-supply` property is missing from the `&pmi8998_typec` node, which completely breaks VBUS power delivery in USB host mode.
--
commit fd2e287ee85d01cae64bd27f78d0a7b1a4d6ea65
Author: taygoth <taygoth@gmail.com>
arm64: dts: qcom: sdm845-oneplus-common: enable USB Type-C role switching
This commit enables the PMI8998 Type-C controller and configures the dwc3
controller for OTG mode on the OnePlus 6/6T. It removes the maximum-speed
property and maps the USB endpoints for role switching.
> diff --git a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> --- a/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sdm845-oneplus-common.dtsi
[ ... ]
> +&pmi8998_vbus {
> + regulator-min-microamp = <500000>;
> + regulator-max-microamp = <1500000>;
> + status = "okay";
> +};
> +
> +&pmi8998_typec {
> + status = "okay";
Does this node need a vdd-vbus-supply property?
The qcom,pmi8998-typec driver looks up the VBUS regulator using
devm_regulator_get_optional(dev, "vdd-vbus"). Without a vdd-vbus-supply
property pointing to &pmi8998_vbus, the lookup returns -ENODEV and the
driver proceeds with a NULL vbus.
Will this result in the driver silently skipping the VBUS regulator
enablement during USB_ROLE_HOST transitions, leaving bus-powered downstream
peripherals without power?
> +
> + connector {
> + compatible = "usb-c-connector";
[ ... ]
> @@ -890,19 +920,18 @@ &usb_1 {
> };
>
> &usb_1_dwc3 {
> - /*
> - * We don't have the capability to switch modes yet.
> - */
> - dr_mode = "peripheral";
> -
> - /* fastest mode for USB 2 */
> - maximum-speed = "high-speed";
> + dr_mode = "otg";
> + usb-role-switch;
Is it safe to remove the maximum-speed property here?
The commit message notes that the role switching infrastructure handles speed
negotiation through the usb-c-connector. However, Type-C CC pins typically
only negotiate power delivery and data roles, not the underlying USB protocol
speed limits.
If maximum-speed is omitted, the DWC3 core driver falls back to reading the
controller's internal hardware parameters (GHWPARAMS3). Since the SDM845 IP
is SuperSpeed-capable, it will default to USB_SPEED_SUPER.
Because the board only wires High-Speed lines and drops the SuperSpeed PHY
(phys = <&usb_1_hsphy>), will the xHCI driver register a SuperSpeed root hub
and attempt Rx.Detect polling? Could attempting to access the PIPE interface
of an unclocked QMP PHY trigger an AXI bus hang?
>
> /* Remove USB3 phy as it's unused on this device. */
> phys = <&usb_1_hsphy>;
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1779127507.git.taygoth@gmail.com?part=5
next prev parent reply other threads:[~2026-05-18 21:36 UTC|newest]
Thread overview: 22+ 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 20:42 ` sashiko-bot
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 20:58 ` sashiko-bot
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 21:19 ` sashiko-bot
2026-05-18 20:22 ` [PATCH 5/6] arm64: dts: qcom: sdm845-oneplus-common: enable USB Type-C role switching taygoth
2026-05-18 21:36 ` sashiko-bot [this message]
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
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=20260518213644.50880C2BCB7@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--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 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.