On ACPI-enabled systems Linux users can enjoy PCIe M.2 connected peripherals that “just work” without any extra fuss. But for those relying on Device Tree (DT) handling by the kernel, new patches from Qualcomm are working on representing PCIe M.2 connectors within DT files.
Qualcomm engineer Manivannan Sadhasivam sent out the latest patches working to support the handling of PCIe M.2 connectors within Device Tree files. The continued headache of dealing with DTs as opposed to ACPI and other standards-based discovery. Sadhasivam explained of this PCIe M.2 support for Device Trees:
“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 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.”
The code is under review on the Linux kernel mailing list for this patch series.
Follow-up patches are planned for supporting WiFI/Bluetooth cards via the M.2 connection. Testing is happening on a Qualcomm Snapdragon X1 Elite powered Lenovo ThinkPad T14s with NVMe SSD via the M.2 interface.
