All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: Val Packett <val@packett.cool>
Cc: Loic Poulain <loic.poulain@oss.qualcomm.com>,
	 Bartosz Golaszewski <brgl@kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	 Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-pci@vger.kernel.org,  linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	 linux-bluetooth@vger.kernel.org, devicetree@vger.kernel.org,
	 Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
	Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>,
	 Wei Deng <wei.deng@oss.qualcomm.com>
Subject: Re: [PATCH v7 5/8] Bluetooth: hci_qca: Support QCA2066 on M.2 connector via pwrseq
Date: Thu, 12 Nov 2026 16:02:46 +0530	[thread overview]
Message-ID: <avWVnjF86FLFvfOC@debian> (raw)
In-Reply-To: <906ebec9-de19-4a1e-9472-dcf8529fa232@packett.cool>

On Mon, Oct 12, 2026 at 04:10:26PM -0300, Val Packett wrote:
> 
> On 10/9/26 1:40 PM, Loic Poulain wrote:
> > Hi Val,
> > 
> > On Thu, Oct 8, 2026 at 12:58 AM Val Packett <val@packett.cool> wrote:
> > > 
> > > On 10/5/26 9:21 AM, Loic Poulain wrote:
> > > > For QCA2066 (and other QCA chips) on M.2 connectors, the UART enable is
> > > > controlled by the W_DISABLE2# signal managed by the pcie-m2 power sequencer
> > > > rather than a dedicated BT enable GPIO.
> > > > 
> > > > When the serdev controller has an OF graph (indicating it is connected to
> > > > an M.2 connector), acquire the 'uart' pwrseq target from the connector's
> > > > power sequencer and use it to control BT power instead of the bt-enable
> > > > GPIO. This is factored out into qca_serdev_get_m2_pwrseq().
> > > > 
> > > > Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
> > > > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
> > > > Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
> > > > Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> > > > ---
> > > >    drivers/bluetooth/hci_qca.c | 47 +++++++++++++++++++++++++++++++++++----------
> > > >    1 file changed, 37 insertions(+), 10 deletions(-)
> > > > 
> > > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> > > > index 1d27ff98034ba99d0783e48db5c605f3b31117ea..b6ec1a57248e2cf4bd138898ffc5cad45b1b4a8b 100644
> > > > --- a/drivers/bluetooth/hci_qca.c
> > > > +++ b/drivers/bluetooth/hci_qca.c
> > > > @@ -1875,6 +1875,9 @@ static int qca_power_on(struct hci_dev *hdev)
> > > >                        /* Controller needs time to bootup. */
> > > >                        msleep(150);
> > > >                }
> > > > +
> > > > +             if (qcadev->bt_power.pwrseq)
> > > > +                     pwrseq_power_on(qcadev->bt_power.pwrseq);
> > > >        }
> > > > 
> > > >        clear_bit(QCA_BT_OFF, &qca->flags);
> > > > @@ -2396,6 +2399,34 @@ static int qca_init_regulators(struct qca_power *qca,
> > > >        return 0;
> > > >    }
> > > > 
> > > > +static void qca_serdev_put_pwrseq(void *data)
> > > > +{
> > > > +     pwrseq_put(data);
> > > > +}
> > > > +
> > > > +static int qca_serdev_get_m2_pwrseq(struct qca_serdev *qcadev)
> > > > +{
> > > > +     struct serdev_device *serdev = qcadev->serdev_hu.serdev;
> > > > +     struct pwrseq_desc *pwrseq;
> > > > +
> > > > +     if (!of_graph_is_present(dev_of_node(&serdev->ctrl->dev)))
> > > > +             return 0;
> > > Seems like of_graph_is_present does *not* return false for the existing
> > > (non-connector) setup which is currently used in all the laptop device
> > > trees..
> > If I understand the issue correctly, this can only occur when a UART
> > 'port' is left unconnected, in which case the failure is legitimate.
> > The laptop device trees should be fixed accordingly, either by
> > connecting the port to the corresponding M.2 device or by using the
> > usual Bluetooth UART child-node approach. I don't see this issue in
> > mainline.
> 
> So it looks like this is because commit 014501d141ed ("arm64: dts: qcom:
> hamoa: Add graph port/endpoint anchors to pcie4_port0 and uart14")
> unconditionally added the uart14 endpoint to hamoa.dtsi itself in
> preparation for the future transition to proper M.2 descriptions.
> 
> The laptop dts'es themselves still have the older child-node description for
> bluetooth, with a dummy port { uart14_ep: endpoint {}; }; that's not used
> yet.
> 
> Could the check be extended to actually verify that there's actually
> something the graph endpoint is connected to? Or should that commit be
> reverted?
> 

Taken care now: https://lore.kernel.org/linux-arm-msm/20261112-hamoa-dt-fix-v1-1-55efbac840f4@oss.qualcomm.com/

I shouldn't have given my r-b tag for the offending patch :/

- Mani

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2026-11-12 10:32 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 12:21 [PATCH v7 0/8] arm64: dts: monaco-arduino-monza: Add support for LGA WiFi/BT module Loic Poulain
2026-10-05 12:21 ` [PATCH v7 1/8] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Loic Poulain
2026-10-05 12:29   ` sashiko-bot
2026-10-05 13:01   ` arm64: dts: monaco-arduino-monza: Add support for LGA WiFi/BT module bluez.test.bot
2026-11-10 18:58   ` [PATCH v7 1/8] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Jesse Casco
2026-10-05 12:21 ` [PATCH v7 2/8] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available' Loic Poulain
2026-10-05 12:28   ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 3/8] Bluetooth: hci_qca: Set 'bt_en_available' based on pwrseq power controllability Loic Poulain
2026-10-05 12:33   ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 4/8] Bluetooth: hci_qca: Embed bt_power in struct qca_serdev Loic Poulain
2026-10-05 12:29   ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 5/8] Bluetooth: hci_qca: Support QCA2066 on M.2 connector via pwrseq Loic Poulain
2026-10-05 12:33   ` sashiko-bot
2026-10-07 22:57   ` Val Packett
2026-10-09 16:40     ` Loic Poulain
2026-10-12 19:10       ` Val Packett
2026-11-12 10:32         ` Manivannan Sadhasivam [this message]
2026-10-05 12:21 ` [PATCH v7 6/8] Bluetooth: hci_qca: Flatten struct qca_power into struct qca_serdev Loic Poulain
2026-10-05 12:29   ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 7/8] dt-bindings: connector: pcie-m2-e: Add vendor LGA connector compatible Loic Poulain
2026-10-05 12:23   ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 8/8] arm64: dts: qcom: monaco-arduino-monza: Add QCA2066 M.2 WiFi/BT support Loic Poulain
2026-10-05 12:37   ` sashiko-bot

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=avWVnjF86FLFvfOC@debian \
    --to=mani@kernel.org \
    --cc=andersson@kernel.org \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=robh@kernel.org \
    --cc=val@packett.cool \
    --cc=wei.deng@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 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.