Re: [PATCH 2/2] arm64: dts: qcom: monaco-evk: Describe the PCIe M.2 Key E connector

From: Wei Deng

Date: Tue Aug 25 2026 - 05:29:59 EST


Hi Konrad,

On Wed, 19 Aug 2026 16:24:35 +0200, Konrad Dybcio wrote:
> On 8/19/26 4:13 PM, Wei Deng wrote:
> > On Wed, 29 Jul 2026 08:06:54 +0530, Wei Deng wrote:
> >> Fair point. I will move the port/endpoint anchors to monaco.dtsi in v2.
> >
> > After testing v2 on qcs8300-ride-sx, BT init broke. qcs8300-ride-sx has a
> > soldered WCN6855 and no M.2 Key E connector, but the pending series [1]
> > uses of_graph_is_present() to detect whether an M.2 connector is present.
> > Since of_graph_is_present() only checks for a 'port' child node, the empty
> > anchors in monaco.dtsi caused hci_qca to incorrectly enter the M.2 pwrseq
> > path on all monaco boards.
> >
> > v3 moves the port/endpoint nodes back to monaco-evk.dts. Please review.
> >
> > [1] https://lore.kernel.org/all/20260720-monza-wireless-v5-1-69ec6743543c@xxxxxxxxxxxxxxxx/
>
> The series should test of_graph_get_remote_endpoint() instead
>
> Konrad

Hi Konrad,

Tested: replacing of_graph_is_present() with of_graph_get_remote_endpoint()
in hci_qca.c works correctly. The M.2 pwrseq path is only entered when a
remote-endpoint is actually populated, so boards like qcs8300-ride (soldered
WCN6855, no M.2 connector) are no longer affected.

Hi Mani, Loic,

We are adding M.2 Key E connector support for monaco-evk [2]. Konrad
suggested moving the port/endpoint anchor nodes to the SoC DTSI
(monaco.dtsi) for clean DTS layering, so that board files only need to
fill in remote-endpoint for boards that actually have an M.2 connector.

However, when we did this, BT init broke on qcs8300-ride-sx, a monaco-based
board with a soldered WCN6855 and no M.2 connector. The root cause is that
of_graph_is_present() in hci_qca.c only checks for the presence of a 'port'
child node — it returns true even when the port/endpoint anchors in the DTSI
are empty (no remote-endpoint set). As a result, hci_qca incorrectly enters
the M.2 pwrseq path on all monaco boards.

Konrad suggested using of_graph_get_remote_endpoint() instead, which only
returns non-NULL when a remote-endpoint is actually populated. I tested this
on lemans and it works correctly.

Would it be acceptable to change the M.2 detection in hci_qca.c [1] from:

if (of_graph_is_present(dev_of_node(&serdev->ctrl->dev))) {
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->ctrl->dev,
"uart");
if (IS_ERR(qcadev->bt_power->pwrseq))
return PTR_ERR(qcadev->bt_power->pwrseq);
break;
}

to:

{
struct device_node *ep, *remote_ep;

ep = of_graph_get_next_endpoint(
dev_of_node(&serdev->ctrl->dev), NULL);
remote_ep = ep ? of_graph_get_remote_endpoint(ep) : NULL;
of_node_put(ep);

if (remote_ep) {
of_node_put(remote_ep);
qcadev->bt_power->pwrseq = devm_pwrseq_get(
&serdev->ctrl->dev, "uart");
if (IS_ERR(qcadev->bt_power->pwrseq))
return PTR_ERR(qcadev->bt_power->pwrseq);
break;
}
}

[1] https://lore.kernel.org/all/20260720-monza-wireless-v5-1-69ec6743543c@xxxxxxxxxxxxxxxx/
[2] https://lore.kernel.org/all/20260819141353.96467-1-wei.deng@xxxxxxxxxxxxxxxx/

--
Best Regards,
Wei Deng