* [PATCH v2 0/4] power: sequencing: pcie-m2: Add PCIe M.2 Key B connector support
@ 2026-11-22 6:45 Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 1/4] dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector Krishna Chaitanya Chundru
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Krishna Chaitanya Chundru @ 2026-11-22 6:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bartosz Golaszewski, Bjorn Andersson,
Konrad Dybcio
Cc: Abel Vesa, alchark, linux-pci, devicetree, linux-kernel,
linux-pm, linux-arm-msm, Krishna Chaitanya Chundru
Add support for PCIe M.2 Mechanical Key B connectors, commonly used for
WWAN adapters.
The series introduces a DT binding for the M.2 Key B connector and
extends the PCIe M.2 power sequencing driver to handle the 3.3V/VBAT
supply and the FULL_CARD_POWER_OFF#, RESET#, and W_DISABLE1# signals.
Finally, describe the WWAN M.2 Key B connector on the Glymur CRD and the
Nord RRD. On Glymur the WWAN supply moves from the PCIe6 Root Port node to
the connector, so that the slot power is controlled through the pwrseq-pcie-m2
driver and the PCI pwrctrl framework, like the other M.2 connectors.
The series is based on the qcom tree [1], arm64-for-7.5, which has the Nord
PCIe root port DT nodes that the Nord RRD patch needs. That patch also
depends on the Nord PCIe controller support from the PCI tree, which is in
linux-next.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/log/?h=arm64-for-7.5
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
Changes in v2:
- Binding: describe SATA/PCIe SSD Adapters too, since the Key B slot accepts
them (Alexey)
- Binding: add optional config-gpios for CONFIG_0..3 with the Table 3-18
decode, and config-state to fix the configuration on boards that do not
sense it; defaults to WWAN PCIe (Alexey)
- Binding: replace w-disable2-gpios and wowwan-gpios with gpio0-gpios to
gpio11-gpios, as GPIO_0..11 change function with the Port Configuration;
the functions are listed in the binding, with the IPC pins and CONFIG
state 14 marked as vendor defined (Rob, Alexey)
- Binding: add optional alert-gpios for the SSD SMBus ALERT# (Rob), and
i2c-parent, devslp-gpios and pln-gpios for the other SSD signals (Alexey)
- Binding: replace one port per interface with one port per muxed pin group,
with endpoints selecting the interface: PCIe lane 0/SATA, USB3.1/SSIC/
PCIe lane 1, and USB 2.0 (Rob, Alexey)
- DT: add the Nord RRD WWAN connector (new patch)
- Rebased onto the qcom tree, arm64-for-7.5
- Link to v1: https://patch.msgid.link/20261021-pcie6_fix-v1-0-ad37134c35a3@oss.qualcomm.com
---
Krishna Chaitanya Chundru (4):
dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector
power: sequencing: pcie-m2: Add support for PCIe M.2 Key B connectors
arm64: dts: qcom: glymur-crd: Describe the PCIe M.2 Key B connector
arm64: dts: qcom: nord-rrd: Describe the PCIe M.2 Key B connector
.../bindings/connector/pcie-m2-b-connector.yaml | 332 +++++++++++++++++++++
MAINTAINERS | 1 +
arch/arm64/boot/dts/qcom/glymur-crd.dtsi | 29 +-
arch/arm64/boot/dts/qcom/nord-rrd.dts | 40 +++
drivers/power/sequencing/pwrseq-pcie-m2.c | 70 +++++
5 files changed, 470 insertions(+), 2 deletions(-)
---
base-commit: dde0308a2f8867806a444df1fdd7e685b1c56d5b
change-id: 20261021-pcie6_fix-cf66f4b8b387
Best regards,
--
Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/4] dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector
2026-11-22 6:45 [PATCH v2 0/4] power: sequencing: pcie-m2: Add PCIe M.2 Key B connector support Krishna Chaitanya Chundru
@ 2026-11-22 6:45 ` Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 2/4] power: sequencing: pcie-m2: Add support for PCIe M.2 Key B connectors Krishna Chaitanya Chundru
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Krishna Chaitanya Chundru @ 2026-11-22 6:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bartosz Golaszewski, Bjorn Andersson,
Konrad Dybcio
Cc: Abel Vesa, alchark, linux-pci, devicetree, linux-kernel,
linux-pm, linux-arm-msm, Krishna Chaitanya Chundru
Add the devicetree binding for PCIe M.2 Mechanical Key B connector
defined in the PCI Express M.2 Specification, r4.2, sec 3.2.19.1. This
connector is used to attach WWAN Adapters to the host machine over
interfaces such as PCIe, USB3.1 Gen1, SSIC, or USB 2.0. The slot also
accepts SATA and PCIe SSD Adapters, which use the same pins.
Interfaces that share connector pins are described as one graph port
per pin group, with the endpoint number selecting between the mutually
exclusive interfaces.
The connector provides a primary power supply of 3.3V/VBAT, along with
optional GPIO signals: FULL_CARD_POWER_OFF#, RESET#, W_DISABLE1# and DPR
for WWAN Adapters, and DEVSLP, PLN# and SMBus ALERT# for SSD Adapters,
plus an I2C parent for the SSD SMBus.
The function of the GPIO_0..GPIO_11 pins depends on the Port
Configuration, so they are described by gpioN-gpios properties with the
function of each pin per configuration documented in the binding. The
Adapter configuration is either sensed through config-gpios
(CONFIG_0..3) or fixed with config-state, which defaults to WWAN PCIe.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
.../bindings/connector/pcie-m2-b-connector.yaml | 332 +++++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 333 insertions(+)
diff --git a/Documentation/devicetree/bindings/connector/pcie-m2-b-connector.yaml b/Documentation/devicetree/bindings/connector/pcie-m2-b-connector.yaml
new file mode 100644
index 000000000000..4760863ff4f7
--- /dev/null
+++ b/Documentation/devicetree/bindings/connector/pcie-m2-b-connector.yaml
@@ -0,0 +1,332 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/connector/pcie-m2-b-connector.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: PCIe M.2 Mechanical Key B Connector
+
+maintainers:
+ - Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
+
+description:
+ A PCIe M.2 B connector node represents a physical PCIe M.2 Mechanical Key B
+ connector. Mechanical Key B connectors are used to connect WWAN devices to
+ the host machine over interfaces like PCIe, USB3.1 Gen1, SSIC, or USB 2.0,
+ selected by the Adapter's configuration pins. The slot also accepts SATA and
+ PCIe SSD Adapters, which use the same pins as the WWAN interfaces.
+
+properties:
+ compatible:
+ const: pcie-m2-b-connector
+
+ vpcie3v3-supply:
+ description: A phandle to the regulator for the 3.3v/VBAT supply.
+
+ full-card-power-off-gpios:
+ description: GPIO output to FULL_CARD_POWER_OFF# signal. This signal is
+ used by the host system to turn off the entire Adapter. Refer, PCI
+ Express M.2 Specification r4.0, sec 3.2.13.1 for more details.
+ maxItems: 1
+
+ reset-gpios:
+ description: GPIO output to RESET# signal. This signal is used by the
+ host system to place the WWAN Adapter into a power-on reset condition.
+ Refer, PCI Express M.2 Specification r4.0, sec 3.2.13.2 for more
+ details.
+ maxItems: 1
+
+ w-disable1-gpios:
+ description: GPIO output to W_DISABLE1# signal. This signal is used by
+ the host system to disable the WWAN radio on the Adapter. Refer, PCI
+ Express M.2 Specification r4.0, sec 3.1.12.3 for more details.
+ maxItems: 1
+
+ dpr-gpios:
+ description: GPIO output to the Dynamic Power Reduction (DPR) signal.
+ This signal is provided by a host system proximity sensor to the
+ Adapter to trigger a reduction in the radio transmit output power to
+ meet regulatory SAR requirements. Refer, PCI Express M.2 Specification
+ r4.0, sec 3.2.13.4 for more details.
+ maxItems: 1
+
+ alert-gpios:
+ description: GPIO input to the SMBus ALERT# signal (pin 44, shared with
+ GPIO_2). SSD Adapters assert this signal to indicate to the host that
+ the SMBus device requires attention. It is not present on WWAN
+ Adapters. Refer, PCI Express M.2 Specification r4.2, sec 3.2.14.2.1
+ for more details.
+ maxItems: 1
+
+ i2c-parent:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: Phandle to the host I2C controller connected to the SMBus
+ pins SMB_CLK and SMB_DATA (pins 40 and 42, shared with GPIO_0 and
+ GPIO_1). The SMBus is only present on SSD Adapters. Refer, PCI Express
+ M.2 Specification r4.2, sec 3.2.14.2 for more details.
+
+ devslp-gpios:
+ description: GPIO output to the DEVSLP signal (pin 38). The host asserts
+ this signal to tell a SATA SSD to enter the Device Sleep power state.
+ It is only present on SATA SSD Adapters. Refer, PCI Express M.2
+ Specification r4.2, sec 3.2.10.1 for more details.
+ maxItems: 1
+
+ pln-gpios:
+ description: GPIO output to the Power Loss Notification (PLN#) signal
+ (pin 8, shared with W_DISABLE1#). The host asserts this signal to
+ notify a PCIe SSD that a power loss event is about to occur. WWAN
+ boards use w-disable1-gpios for this pin instead. Refer, PCI Express
+ M.2 Specification r4.2, sec 3.2.18.1 for more details.
+ maxItems: 1
+
+ config-gpios:
+ description: |
+ GPIO inputs sensing the four CONFIG_0..3 pins (pins 21, 69, 75 and 1
+ respectively, listed in that order in this property). The Adapter
+ grounds or leaves unconnected (NC) each of these pins to tell the host
+ the Adapter type, the host interface in use and, for WWAN Adapters, the
+ active GPIO_0..11 Port Configuration. Boards that only ever use one
+ Adapter type should use config-state instead. If both properties are
+ present, config-gpios takes precedence. Refer, PCI Express M.2
+ Specification r4.2, sec 3.2.15 and Table 3-18 for more details.
+
+ Table 3-18. Socket 2 Add-in Card Configuration:
+
+ CONFIG_0 CONFIG_1 CONFIG_2 CONFIG_3 Adapter Type / Host Interface Port Config
+ GND GND GND GND SSD - SATA N/A
+ GND NC GND GND SSD - PCIe N/A
+ GND GND NC GND WWAN - PCIe 0
+ GND NC NC GND WWAN - PCIe 1
+ GND GND GND NC WWAN - PCIe, USB3.1 Gen1 0
+ GND NC GND NC WWAN - PCIe, USB3.1 Gen1 1
+ GND GND NC NC WWAN - PCIe, USB3.1 Gen1 2
+ GND NC NC NC WWAN - PCIe, USB3.1 Gen1 3
+ NC GND GND GND WWAN - SSIC 0
+ NC NC GND GND WWAN - SSIC 1
+ NC GND NC GND WWAN - SSIC 2
+ NC NC NC GND WWAN - SSIC 3
+ NC GND GND NC WWAN - PCIe 2
+ NC NC GND NC WWAN - PCIe 3
+ NC GND NC NC WWAN - PCIe, USB3.1 Gen1 vendor-defined
+ NC NC NC NC No Add-in Card present N/A
+ minItems: 4
+ maxItems: 4
+
+ config-state:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Fixed Adapter configuration for boards that do not sense the CONFIG_0..3
+ pins, given as the state number (0-14) of Table 3-18 of the PCI Express
+ M.2 Specification r4.2. It selects the Adapter type, the host interface
+ and, for WWAN Adapters, the Port Configuration used to interpret the
+ gpioN-gpios properties. Ignored if config-gpios is present. If neither
+ property is present, state 2 (WWAN - PCIe, Port Config_0) is assumed.
+ minimum: 0
+ maximum: 14
+ default: 2
+
+ clocks:
+ description: 32.768 KHz Suspend Clock (SUSCLK) input from the host system to
+ the M.2 card. Refer, PCI Express M.2 Specification r4.0, sec 3.1.12.1 for
+ more details.
+ maxItems: 1
+
+ ports:
+ $ref: /schemas/graph.yaml#/properties/ports
+ description: OF graph bindings modeling the interfaces exposed on the
+ connector. Several interfaces share the same connector pins and are
+ selected by the CONFIG_0..3 pins, so each port describes one group of
+ pins and its endpoints describe the mutually exclusive interfaces that
+ can be present on that group.
+
+ properties:
+ port@0:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: |
+ Pins 41, 43, 47 and 49. The endpoint number selects the interface:
+ 0 - PCIe lane 0
+ 1 - SATA
+ patternProperties:
+ '^endpoint(@[0-9a-f]+)?$':
+ type: object
+ properties:
+ reg:
+ enum: [0, 1]
+
+ port@1:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: |
+ Pins 29, 31, 35 and 37. The endpoint number selects the interface:
+ 0 - USB3.1 Gen1
+ 1 - SSIC
+ 2 - PCIe lane 1
+ patternProperties:
+ '^endpoint(@[0-9a-f]+)?$':
+ type: object
+ properties:
+ reg:
+ enum: [0, 1, 2]
+
+ port@2:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: USB 2.0 interface (pins 7 and 9)
+
+ anyOf:
+ - required:
+ - port@0
+ - required:
+ - port@1
+
+patternProperties:
+ '^gpio([0-9]|1[01])-gpios$':
+ description: |
+ GPIO connected to the GPIO_<N> pin of the connector, where N is the
+ number in the property name. The function of these pins depends on the
+ Port Configuration selected by config-gpios or config-state (Table 3-15
+ of the PCI Express M.2 Specification r4.2, sec 3.2.13.3):
+
+ GPIO Pin Config_0 Config_1 Config_2 Config_3
+ 0 40 GNSS_SCL GNSS_SCL SIM_DETECT2 IPC_0
+ 1 42 GNSS_SDA GNSS_SDA UIM_DATA2 IPC_1
+ 2 44 GNSS_IRQ GNSS_IRQ UIM_CLK2 IPC_2
+ 3 46 SYSCLK GNSS_0 UIM_RESET2 IPC_3
+ 4 48 TX_BLANKING GNSS_1 UIM_PWR2 IPC_4
+ 5 20 AUDIO_0 AUDIO_0 RFU AUDIO_0
+ 6 22 AUDIO_1 AUDIO_1 RFU AUDIO_1
+ 7 24 AUDIO_2 AUDIO_2 RFU IPC_5/AUDIO_2
+ 8 28 AUDIO_3 AUDIO_3 PLA_S2# IPC_6/AUDIO_3
+ 9 10 LED_1# LED_1# LED_1# DAS/DSS/IPC_7
+ 10 26 W_DISABLE2# W_DISABLE2# W_DISABLE2# HSIC_STROBE
+ 11 23 WoWWAN# WoWWAN# WoWWAN# HSIC_DATA
+
+ The IPC_0..7 functions of Port Config_3 are vendor defined, as are all
+ functions in CONFIG state 14.
+
+ On SSD Adapters (CONFIG states 0 and 1) the same pins are SMB_CLK
+ (GPIO_0), SMB_DATA (GPIO_1), ALERT# (GPIO_2), PLA_S2# (GPIO_8), and
+ LED_1# or, on SATA, DAS/DSS (GPIO_9).
+
+ Only list the pins that are wired to a host GPIO. Pins used as a bus
+ signal in the selected Port Configuration (I2C, I2S/SLIMbus, HSIC) are
+ not GPIOs and are not described by these properties.
+ maxItems: 1
+
+required:
+ - compatible
+ - vpcie3v3-supply
+
+additionalProperties: false
+
+examples:
+ # PCI M.2 Key B connector for WWAN with PCIe interface
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ connector {
+ compatible = "pcie-m2-b-connector";
+ vpcie3v3-supply = <&vreg_wwan>;
+ full-card-power-off-gpios = <&tlmm 121 GPIO_ACTIVE_LOW>;
+ w-disable1-gpios = <&tlmm 122 GPIO_ACTIVE_LOW>;
+ gpio10-gpios = <&tlmm 123 GPIO_ACTIVE_LOW>;
+ gpio11-gpios = <&tlmm 128 GPIO_ACTIVE_LOW>;
+ /* A zero phandle marks a CONFIG pin that is not wired to a host GPIO */
+ config-gpios = <&tlmm 124 GPIO_ACTIVE_HIGH>,
+ <&tlmm 125 GPIO_ACTIVE_HIGH>,
+ <0>,
+ <&tlmm 127 GPIO_ACTIVE_HIGH>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&pcie6_port0_ep>;
+ };
+ };
+
+ port@2 {
+ reg = <2>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&usb_hs_ep>;
+ };
+ };
+ };
+ };
+
+ # PCI M.2 Key B connector used for a SATA SSD
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ connector {
+ compatible = "pcie-m2-b-connector";
+ vpcie3v3-supply = <&vreg_ssd>;
+ config-state = <0>;
+ i2c-parent = <&i2c0>;
+ alert-gpios = <&tlmm 130 GPIO_ACTIVE_LOW>;
+ devslp-gpios = <&tlmm 131 GPIO_ACTIVE_HIGH>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ endpoint@1 {
+ reg = <1>;
+ remote-endpoint = <&sata_port0_ep>;
+ };
+ };
+ };
+ };
+
+ # PCI M.2 Key B connector used for a 2-lane PCIe SSD
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ connector {
+ compatible = "pcie-m2-b-connector";
+ vpcie3v3-supply = <&vreg_ssd>;
+ config-state = <1>;
+ pln-gpios = <&tlmm 132 GPIO_ACTIVE_LOW>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&pcie_port0_ep>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ endpoint@2 {
+ reg = <2>;
+ remote-endpoint = <&pcie_port1_ep>;
+ };
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 93abbb315065..b9db9686dac5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22255,6 +22255,7 @@ PCIE M.2 POWER SEQUENCING
M: Manivannan Sadhasivam <mani@kernel.org>
L: linux-pci@vger.kernel.org
S: Maintained
+F: Documentation/devicetree/bindings/connector/pcie-m2-b-connector.yaml
F: Documentation/devicetree/bindings/connector/pcie-m2-e-connector.yaml
F: Documentation/devicetree/bindings/connector/pcie-m2-m-connector.yaml
F: drivers/power/sequencing/pwrseq-pcie-m2.c
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/4] power: sequencing: pcie-m2: Add support for PCIe M.2 Key B connectors
2026-11-22 6:45 [PATCH v2 0/4] power: sequencing: pcie-m2: Add PCIe M.2 Key B connector support Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 1/4] dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector Krishna Chaitanya Chundru
@ 2026-11-22 6:45 ` Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 3/4] arm64: dts: qcom: glymur-crd: Describe the PCIe M.2 Key B connector Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 4/4] arm64: dts: qcom: nord-rrd: " Krishna Chaitanya Chundru
3 siblings, 0 replies; 5+ messages in thread
From: Krishna Chaitanya Chundru @ 2026-11-22 6:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bartosz Golaszewski, Bjorn Andersson,
Konrad Dybcio
Cc: Abel Vesa, alchark, linux-pci, devicetree, linux-kernel,
linux-pm, linux-arm-msm, Krishna Chaitanya Chundru
Add support for handling the power sequence of the PCIe M.2 Key B
connectors. These connectors are used to attach WWAN Adapters to the
host machine over interfaces such as PCIe, USB3.1 Gen1, SSIC, or USB
2.0.
Currently, this driver only supports driving the 3.3V/VBAT power
supply along with the FULL_CARD_POWER_OFF#, RESET#, and W_DISABLE1#
GPIOs as a single "pcie" target, since Key B Adapters expose only a
discoverable PCIe/USB interface and no non-discoverable bus (unlike
Key E's UART-attached Bluetooth device), so no serdev creation is
needed. The other signals described in the binding are not supported
yet.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
drivers/power/sequencing/pwrseq-pcie-m2.c | 70 +++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)
diff --git a/drivers/power/sequencing/pwrseq-pcie-m2.c b/drivers/power/sequencing/pwrseq-pcie-m2.c
index 56c5d51293c1..8af4a059b596 100644
--- a/drivers/power/sequencing/pwrseq-pcie-m2.c
+++ b/drivers/power/sequencing/pwrseq-pcie-m2.c
@@ -39,6 +39,8 @@ struct pwrseq_pcie_m2_ctx {
struct notifier_block nb;
struct gpio_desc *w_disable1_gpio;
struct gpio_desc *w_disable2_gpio;
+ struct gpio_desc *full_card_power_off_gpio;
+ struct gpio_desc *reset_gpio;
struct device *dev;
struct list_head pci_devices;
struct mutex list_lock;
@@ -135,6 +137,45 @@ static const struct pwrseq_unit_data pwrseq_pcie_m2_e_pcie_unit_data = {
.disable = pwrseq_pci_m2_e_pcie_disable,
};
+static int pwrseq_pci_m2_b_pcie_enable(struct pwrseq_device *pwrseq)
+{
+ struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
+ int ret;
+
+ ret = gpiod_set_value_cansleep(ctx->full_card_power_off_gpio, 0);
+ if (ret)
+ return ret;
+
+ ret = gpiod_set_value_cansleep(ctx->reset_gpio, 0);
+ if (ret)
+ return ret;
+
+ return gpiod_set_value_cansleep(ctx->w_disable1_gpio, 0);
+}
+
+static int pwrseq_pci_m2_b_pcie_disable(struct pwrseq_device *pwrseq)
+{
+ struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
+ int ret;
+
+ ret = gpiod_set_value_cansleep(ctx->w_disable1_gpio, 1);
+ if (ret)
+ return ret;
+
+ ret = gpiod_set_value_cansleep(ctx->reset_gpio, 1);
+ if (ret)
+ return ret;
+
+ return gpiod_set_value_cansleep(ctx->full_card_power_off_gpio, 1);
+}
+
+static const struct pwrseq_unit_data pwrseq_pcie_m2_b_pcie_unit_data = {
+ .name = "pcie-enable",
+ .deps = pwrseq_pcie_m2_unit_deps,
+ .enable = pwrseq_pci_m2_b_pcie_enable,
+ .disable = pwrseq_pci_m2_b_pcie_disable,
+};
+
static const struct pwrseq_unit_data pwrseq_pcie_m2_m_pcie_unit_data = {
.name = "pcie-enable",
.deps = pwrseq_pcie_m2_unit_deps,
@@ -166,6 +207,11 @@ static const struct pwrseq_target_data pwrseq_pcie_m2_e_pcie_target_data = {
.is_controllable = pwrseq_pci_m2_e_pcie_is_controllable,
};
+static const struct pwrseq_target_data pwrseq_pcie_m2_b_pcie_target_data = {
+ .name = "pcie",
+ .unit = &pwrseq_pcie_m2_b_pcie_unit_data,
+};
+
static const struct pwrseq_target_data pwrseq_pcie_m2_m_pcie_target_data = {
.name = "pcie",
.unit = &pwrseq_pcie_m2_m_pcie_unit_data,
@@ -177,6 +223,11 @@ static const struct pwrseq_target_data *pwrseq_pcie_m2_e_targets[] = {
NULL
};
+static const struct pwrseq_target_data *pwrseq_pcie_m2_b_targets[] = {
+ &pwrseq_pcie_m2_b_pcie_target_data,
+ NULL
+};
+
static const struct pwrseq_target_data *pwrseq_pcie_m2_m_targets[] = {
&pwrseq_pcie_m2_m_pcie_target_data,
NULL
@@ -186,6 +237,10 @@ static const struct pwrseq_pcie_m2_pdata pwrseq_pcie_m2_e_of_data = {
.targets = pwrseq_pcie_m2_e_targets,
};
+static const struct pwrseq_pcie_m2_pdata pwrseq_pcie_m2_b_of_data = {
+ .targets = pwrseq_pcie_m2_b_targets,
+};
+
static const struct pwrseq_pcie_m2_pdata pwrseq_pcie_m2_m_of_data = {
.targets = pwrseq_pcie_m2_m_targets,
};
@@ -577,6 +632,17 @@ static int pwrseq_pcie_m2_probe(struct platform_device *pdev)
goto err_free_regulators;
}
+ ctx->full_card_power_off_gpio = devm_gpiod_get_optional(dev, "full-card-power-off",
+ GPIOD_OUT_HIGH);
+ if (IS_ERR(ctx->full_card_power_off_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->full_card_power_off_gpio),
+ "Failed to get the FULL_CARD_POWER_OFF# GPIO\n");
+
+ ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
+ if (IS_ERR(ctx->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
+ "Failed to get the RESET# GPIO\n");
+
config.parent = dev;
config.owner = THIS_MODULE;
config.drvdata = ctx;
@@ -641,6 +707,10 @@ static const struct of_device_id pwrseq_pcie_m2_of_match[] = {
.compatible = "pcie-m2-e-connector",
.data = &pwrseq_pcie_m2_e_of_data,
},
+ {
+ .compatible = "pcie-m2-b-connector",
+ .data = &pwrseq_pcie_m2_b_of_data,
+ },
{ }
};
MODULE_DEVICE_TABLE(of, pwrseq_pcie_m2_of_match);
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 3/4] arm64: dts: qcom: glymur-crd: Describe the PCIe M.2 Key B connector
2026-11-22 6:45 [PATCH v2 0/4] power: sequencing: pcie-m2: Add PCIe M.2 Key B connector support Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 1/4] dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 2/4] power: sequencing: pcie-m2: Add support for PCIe M.2 Key B connectors Krishna Chaitanya Chundru
@ 2026-11-22 6:45 ` Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 4/4] arm64: dts: qcom: nord-rrd: " Krishna Chaitanya Chundru
3 siblings, 0 replies; 5+ messages in thread
From: Krishna Chaitanya Chundru @ 2026-11-22 6:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bartosz Golaszewski, Bjorn Andersson,
Konrad Dybcio
Cc: Abel Vesa, alchark, linux-pci, devicetree, linux-kernel,
linux-pm, linux-arm-msm, Krishna Chaitanya Chundru
The Glymur CRD has a WWAN M.2 slot connected to PCIe6, whose vreg_wwan
supply is described on the PCIe6 Root Port. Describe the slot as a PCIe
M.2 Mechanical Key B connector that owns the supply, so that the slot
power is controlled through the pwrseq-pcie-m2 driver and the PCI
pwrctrl framework, like the other M.2 connectors on this platform.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/glymur-crd.dtsi | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/glymur-crd.dtsi b/arch/arm64/boot/dts/qcom/glymur-crd.dtsi
index 3a9cd5f3ec2b..a66ba8c0ac8c 100644
--- a/arch/arm64/boot/dts/qcom/glymur-crd.dtsi
+++ b/arch/arm64/boot/dts/qcom/glymur-crd.dtsi
@@ -230,6 +230,27 @@ vreg_wwan: regulator-wwan {
pinctrl-names = "default";
};
+ wwan-connector {
+ compatible = "pcie-m2-b-connector";
+ vpcie3v3-supply = <&vreg_wwan>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ wwan_m2_pcie_ep: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&pcie6_port0_ep>;
+ };
+ };
+ };
+ };
+
sound {
compatible = "qcom,glymur-sndcard";
model = "GLYMUR-CRD";
@@ -654,10 +675,14 @@ &pcie6_phy {
};
&pcie6_port0 {
- vpcie3v3-supply = <&vreg_wwan>;
-
reset-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 151 GPIO_ACTIVE_LOW>;
+
+ port {
+ pcie6_port0_ep: endpoint {
+ remote-endpoint = <&wwan_m2_pcie_ep>;
+ };
+ };
};
&pmh0110_f_e1_gpios {
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 4/4] arm64: dts: qcom: nord-rrd: Describe the PCIe M.2 Key B connector
2026-11-22 6:45 [PATCH v2 0/4] power: sequencing: pcie-m2: Add PCIe M.2 Key B connector support Krishna Chaitanya Chundru
` (2 preceding siblings ...)
2026-11-22 6:45 ` [PATCH v2 3/4] arm64: dts: qcom: glymur-crd: Describe the PCIe M.2 Key B connector Krishna Chaitanya Chundru
@ 2026-11-22 6:45 ` Krishna Chaitanya Chundru
3 siblings, 0 replies; 5+ messages in thread
From: Krishna Chaitanya Chundru @ 2026-11-22 6:45 UTC (permalink / raw)
To: Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Bartosz Golaszewski, Bjorn Andersson,
Konrad Dybcio
Cc: Abel Vesa, alchark, linux-pci, devicetree, linux-kernel,
linux-pm, linux-arm-msm, Krishna Chaitanya Chundru
The Nord RRD has an M.2 WWAN slot connected to PCIe3, but neither the
slot supply nor its power control is described. Describe the slot as a
PCIe M.2 Mechanical Key B connector, so that the slot power is
controlled through the pwrseq-pcie-m2 driver and the PCI pwrctrl
framework.
The slot is powered by the vreg_wwan fixed regulator, which is enabled
by the MODEM_SW_PWR_EN GPIO. The MOD_FULL_CARD_POWER_ON_OFF GPIO drives
FULL_CARD_POWER_OFF#, which the Adapter treats as asserted when the
signal is low, so describe it as active low.
Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/nord-rrd.dts | 40 +++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/nord-rrd.dts b/arch/arm64/boot/dts/qcom/nord-rrd.dts
index 827d3ba3a238..59a0210e7fbd 100644
--- a/arch/arm64/boot/dts/qcom/nord-rrd.dts
+++ b/arch/arm64/boot/dts/qcom/nord-rrd.dts
@@ -100,6 +100,40 @@ vreg_wcn_core_vh_1p95: regulator-wcn-core-vh-1p95 {
enable-active-high;
};
+ vreg_wwan: regulator-wwan {
+ compatible = "regulator-fixed";
+
+ regulator-name = "vreg_wwan";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+
+ gpio = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
+ };
+
+ wwan-connector {
+ compatible = "pcie-m2-b-connector";
+ vpcie3v3-supply = <&vreg_wwan>;
+
+ full-card-power-off-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ wwan_m2_pcie_ep: endpoint@0 {
+ reg = <0>;
+ remote-endpoint = <&pcie3_port0_ep>;
+ };
+ };
+ };
+ };
+
wcn7850-pmu {
compatible = "qcom,wcn7850-pmu";
@@ -537,6 +571,12 @@ &pcie3 {
&pcie3_port0 {
reset-gpios = <&tlmm 11 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 9 GPIO_ACTIVE_LOW>;
+
+ port {
+ pcie3_port0_ep: endpoint {
+ remote-endpoint = <&wwan_m2_pcie_ep>;
+ };
+ };
};
&qupv3_0 {
--
2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-22 6:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-22 6:45 [PATCH v2 0/4] power: sequencing: pcie-m2: Add PCIe M.2 Key B connector support Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 1/4] dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 2/4] power: sequencing: pcie-m2: Add support for PCIe M.2 Key B connectors Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 3/4] arm64: dts: qcom: glymur-crd: Describe the PCIe M.2 Key B connector Krishna Chaitanya Chundru
2026-11-22 6:45 ` [PATCH v2 4/4] arm64: dts: qcom: nord-rrd: " Krishna Chaitanya Chundru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®