From: Wei Deng <wei.deng@oss.qualcomm.com>
To: Chen-Yu Tsai <wenst@chromium.org>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Alan Stern <stern@rowland.harvard.edu>,
linux-pm@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, mengshi.wu@oss.qualcomm.com,
quic_chezhou@quicinc.com, cheng.jiang@oss.qualcomm.com,
shuai.zhang@oss.qualcomm.com, jinwang.li@oss.qualcomm.com,
xiuzhuo.shang@oss.qualcomm.com
Subject: Re: [PATCH v4 12/14] power: sequencing: pcie-m2: Add usb and sdio targets for E-key connector
Date: Mon, 13 Jul 2026 15:13:29 +0530 [thread overview]
Message-ID: <20260713094329.4105208-1-wei.deng@oss.qualcomm.com> (raw)
In-Reply-To: <20260709095726.704448-13-wenst@chromium.org>
On Thu, 9 Jul 2026, Chen-Yu Tsai wrote:
> The M.2 E-key connector allows either PCIe or SDIO for WiFi and USB or
> UART for BT. Currently the driver only supports PCIe and UART.
>
> Add power sequencing targets for SDIO and USB. To avoid adding a
> complicated dependency tree, rename the existing power sequencing units
> "pcie" and "uart" to "wifi" and "bt". The existing target names are left
> untouched. The new "sdio" and "usb" targets just point to the renamed
> "wifi" and "bt" units.
>
> The "unit" names are internal to the power sequencing framework, and
> should be confined to a single provider. The names are only
> informational. Dependencies are tracked with pointers to other units.
>
> The "target" names are the strings that the consumer uses to acquire a
> descriptor with. As these remain the same, existing users will continue
> to work.
>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> Changes since v2:
> - Expand commit message
> ---
> drivers/power/sequencing/pwrseq-pcie-m2.c | 41 +++++++++++++++--------
> 1 file changed, 27 insertions(+), 14 deletions(-)
>
Hi Chen-Yu,
We tested this series on the Qualcomm Hamoa IoT EVK with both USB BT
and UART BT M.2 cards and found an issue with UART BT power cycling
when the USB hub is active.
The "uart" and "usb" targets in this patch share the same bt_unit_data.
The USB hub acquires the "usb" target in hub_activate() and never releases
it, so the bt_unit enable_count never reaches zero when hci_qca calls
pwrseq_power_off("uart"). As a result bt_disable() is never called,
W_DISABLE2# stays deasserted, and the BT chip cannot be properly reset.
Observed on Hamoa with a UART BT card (WCN6855, sub 0xe105):
With your patches:
lsmod: pwrseq_pcie_m2 ... 3 (provider + uart + usb)
btmgmt power off -> GPIO116 stays HIGH (bt_unit ref 2->1, no callback)
btmgmt power on -> "hci0: command 0xfc00 tx timeout" -> failed
Without your patches:
lsmod: pwrseq_pcie_m2 ... 2 (provider + uart only)
btmgmt power off -> GPIO116 goes LOW ✓
btmgmt power on -> hci0 UP RUNNING ✓
USB BT card (WCN6855, sub 0x3374) tested separately works correctly with
your patches.
The testing was done with the following Hamoa-specific patches on top of
this series:
[PATCH 1/3] arm64: dts: qcom: hamoa-iot-evk: Describe the PCIe M.2 Key E connector
https://lore.kernel.org/all/20260709-fix-hamoa-m2-w-disable2-v1-1-5e725091266a@oss.qualcomm.com/
[PATCH 2/3] power: sequencing: pcie-m2: Match WCN6855 and WCN7851 UART BT variants by subdevice ID
https://lore.kernel.org/all/20260709-fix-hamoa-m2-w-disable2-v1-2-5e725091266a@oss.qualcomm.com/
The fix we verified is to give "usb" its own independent unit so its
enable_count is tracked separately from "uart":
static const struct pwrseq_unit_data pwrseq_pcie_m2_e_usb_bt_unit_data = {
.name = "usb-bt-enable",
.deps = pwrseq_pcie_m2_unit_deps,
.enable = pwrseq_pci_m2_e_bt_enable,
.disable = pwrseq_pci_m2_e_bt_disable,
};
/* change usb target to point to the independent unit */
static const struct pwrseq_target_data pwrseq_pcie_m2_e_usb_target_data = {
.name = "usb",
.unit = &pwrseq_pcie_m2_e_usb_bt_unit_data,
};
With this change, uart_bt_unit reaches ref=0 on UART BT power_off and
bt_disable() is called correctly. Since a M.2 slot can only carry one
card variant at a time, the two units do not interfere in practice.
Would this be an acceptable fix, or do you have a better approach in mind?
--
Best Regards,
Wei Deng
next prev parent reply other threads:[~2026-07-13 9:43 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 9:57 [PATCH v4 00/14] arm64: mediatek: Add M.2 E-key slot on Chromebooks Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 01/14] device property: Add fwnode_graph_get_port_by_id() Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 02/14] device property: Add fwnode_graph_get_next_port_endpoint() Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 03/14] power: sequencing: Add pwrseq_power_is_on() Chen-Yu Tsai
2026-07-09 10:33 ` Andy Shevchenko
2026-07-09 9:57 ` [PATCH v4 04/14] usb: hub: Return actual error from hub_configure() in hub_probe() Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 05/14] usb: hub: Associate port@ fwnode with USB port device Chen-Yu Tsai
2026-07-10 12:08 ` Greg Kroah-Hartman
2026-07-13 6:40 ` Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 06/14] usb: core: Move struct usb_port and related APIs to port.h Chen-Yu Tsai
2026-07-09 10:36 ` Andy Shevchenko
2026-07-09 14:30 ` Bartosz Golaszewski
2026-07-09 9:57 ` [PATCH v4 07/14] usb: hub: Pass |struct usb_port*| to usb_port_is_power_on() Chen-Yu Tsai
2026-07-09 10:38 ` Andy Shevchenko
2026-07-09 9:57 ` [PATCH v4 08/14] usb: hub: Use usb_hub_set_port_power() to control port power everywhere Chen-Yu Tsai
2026-07-09 10:39 ` Andy Shevchenko
2026-07-09 9:57 ` [PATCH v4 09/14] usb: hub: Power on connected M.2 E-key connectors with power sequencing API Chen-Yu Tsai
2026-07-09 10:53 ` Andy Shevchenko
2026-07-09 9:57 ` [PATCH v4 10/14] dt-bindings: usb: mediatek,mtk-xhci: Switch to ports for USB connections Chen-Yu Tsai
2026-07-09 14:31 ` Bartosz Golaszewski
2026-07-09 9:57 ` [PATCH v4 11/14] power: sequencing: pcie-m2: support matching on remote "port" node Chen-Yu Tsai
2026-07-09 10:55 ` Andy Shevchenko
2026-07-09 9:57 ` [PATCH v4 12/14] power: sequencing: pcie-m2: Add usb and sdio targets for E-key connector Chen-Yu Tsai
2026-07-13 9:43 ` Wei Deng [this message]
2026-07-13 9:57 ` Chen-Yu Tsai
2026-07-13 10:42 ` Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 13/14] arm64: dts: mediatek: mt8195-cherry: Add M.2 E-key slot Chen-Yu Tsai
2026-07-09 9:57 ` [PATCH v4 14/14] arm64: dts: mediatek: mt8188-geralt: Add WiFi/BT as " Chen-Yu Tsai
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=20260713094329.4105208-1-wei.deng@oss.qualcomm.com \
--to=wei.deng@oss.qualcomm.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=brgl@kernel.org \
--cc=cheng.jiang@oss.qualcomm.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jinwang.li@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mengshi.wu@oss.qualcomm.com \
--cc=quic_chezhou@quicinc.com \
--cc=shuai.zhang@oss.qualcomm.com \
--cc=stern@rowland.harvard.edu \
--cc=wenst@chromium.org \
--cc=xiuzhuo.shang@oss.qualcomm.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