From: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Stephan Gerhold <stephan.gerhold@linaro.org>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>,
linux-pm@vger.kernel.org,
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Subject: [PATCH v2 0/4] PCI: Add initial support for handling PCIe M.2 connectors in devicetree
Date: Sat, 08 Nov 2025 08:53:18 +0530 [thread overview]
Message-ID: <20251108-pci-m2-v2-0-e8bc4d7bf42d@oss.qualcomm.com> (raw)
Hi,
This series is an initial attempt to support the PCIe M.2 connectors in the
kernel and devicetree binding. The PCIe M.2 connectors as defined in the PCI
Express M.2 Specification are widely used in Notebooks/Tablet form factors (even
in PCs). On the ACPI platforms, power to these connectors are mostly handled by
the firmware/BIOS and the kernel never bothered to directly power manage them as
like other PCIe connectors. But on the devicetree platforms, the kernel needs to
power manage these connectors with the help of the devicetree description. But
so far, there is no proper representation of the M.2 connectors in devicetree
binding. This forced the developers to fake the M.2 connectors as PMU nodes [1]
and fixed regulators in devicetree.
So to properly support the M.2 connectors in devicetree platforms, this series
introduces the devicetree binding for Mechanical Key M connector as an example
and also the corresponding pwrseq driver and PCI changes in kernel to driver the
connector.
The Mechanical Key M connector is used to connect SSDs to the host machine over
PCIe/SATA interfaces. Due to the hardware constraints, this series only adds
support for driving the PCIe interface of the connector in the kernel.
Also, the optional interfaces supported by the Key M connectors are not
supported in the driver and left for the future enhancements.
Future work
===========
I'm planning to submit the follow-up series to add support for the Mechanical
Key A connector for connecting the WiFI/BT cards, once some initial review
happens on this series.
Testing
=======
This series, together with the devicetree changes [2] [3] were tested on the
Qualcomm X1e based Lenovo Thinkpad T14s Laptop which has the NVMe SSD connected
over PCIe.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts?h=v6.18-rc4&id=d09ab685a8f51ba412d37305ea62628a01cbea57
[2] https://github.com/Mani-Sadhasivam/linux/commit/8f1d17c01a0d607a36e19c6d9f7fc877226ba315
[3] https://github.com/Mani-Sadhasivam/linux/commit/0b1f14a18db2a04046ad6af40e94984166c78fbc
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
---
Changes in v2:
- Incorporated comments from Bartosz and Frank for pwrseq and dt-binding
patches, especially adding the pwrseq match() code.
- Link to v1: https://lore.kernel.org/r/20251105-pci-m2-v1-0-84b5f1f1e5e8@oss.qualcomm.com
---
Manivannan Sadhasivam (4):
dt-bindings: connector: Add PCIe M.2 Mechanical Key M connector
PCI/pwrctrl: Add support for handling PCIe M.2 connectors
PCI/pwrctrl: Create pwrctrl device if the graph port is found
power: sequencing: Add the Power Sequencing driver for the PCIe M.2 connectors
.../bindings/connector/pcie-m2-m-connector.yaml | 122 +++++++++++++++
MAINTAINERS | 7 +
drivers/pci/probe.c | 3 +-
drivers/pci/pwrctrl/Kconfig | 1 +
drivers/pci/pwrctrl/slot.c | 35 ++++-
drivers/power/sequencing/Kconfig | 8 +
drivers/power/sequencing/Makefile | 1 +
drivers/power/sequencing/pwrseq-pcie-m2.c | 163 +++++++++++++++++++++
8 files changed, 334 insertions(+), 6 deletions(-)
---
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
change-id: 20251103-pci-m2-7633631b6faa
Best regards,
--
Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
next reply other threads:[~2025-11-08 3:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 3:23 Manivannan Sadhasivam [this message]
2025-11-08 3:23 ` [PATCH v2 1/4] dt-bindings: connector: Add PCIe M.2 Mechanical Key M connector Manivannan Sadhasivam
2025-11-08 18:10 ` Dmitry Baryshkov
2025-11-09 16:18 ` Manivannan Sadhasivam
2025-11-09 20:13 ` Dmitry Baryshkov
2025-11-11 13:49 ` Manivannan Sadhasivam
2025-11-12 20:12 ` Dmitry Baryshkov
2025-11-13 4:57 ` Manivannan Sadhasivam
2025-11-09 18:34 ` Sebastian Reichel
2025-11-11 13:54 ` Manivannan Sadhasivam
2025-11-12 3:57 ` Chen-Yu Tsai
2025-11-12 14:33 ` Manivannan Sadhasivam
2025-11-12 16:54 ` Frank Li
2025-11-08 3:23 ` [PATCH v2 2/4] PCI/pwrctrl: Add support for handling PCIe M.2 connectors Manivannan Sadhasivam
2025-11-12 14:59 ` Bartosz Golaszewski
2025-11-08 3:23 ` [PATCH v2 3/4] PCI/pwrctrl: Create pwrctrl device if the graph port is found Manivannan Sadhasivam
2025-11-12 15:00 ` Bartosz Golaszewski
2025-11-08 3:23 ` [PATCH v2 4/4] power: sequencing: Add the Power Sequencing driver for the PCIe M.2 connectors Manivannan Sadhasivam
2025-11-12 15:04 ` Bartosz Golaszewski
2025-11-12 15:51 ` Manivannan Sadhasivam
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=20251108-pci-m2-v2-0-e8bc4d7bf42d@oss.qualcomm.com \
--to=manivannan.sadhasivam@oss.qualcomm.com \
--cc=bhelgaas@google.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=stephan.gerhold@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).