Re: [PATCH 1/3] dt-bindings: connector: Add PCIe M.2 Mechanical Key B connector

From: Alexey Charkov

Date: Wed Nov 18 2026 - 02:47:02 EST


Hi Krishna,

On Sat, Nov 14, 2026 at 5:45 AM Krishna Chaitanya Chundru
<krishna.chundru@xxxxxxxxxxxxxxxx> wrote:
> On 10/22/2026 2:56 PM, Alexey Charkov wrote:
> > On Thu, Oct 22, 2026 at 8:27 AM Krishna Chaitanya Chundru
> > <krishna.chundru@xxxxxxxxxxxxxxxx> wrote:
> >>
> >>
> >> On 10/21/2026 9:14 PM, Alexey Charkov wrote:
> >>> Hi Krishna,
> >> Hi Alexey,
> >>
> >> Thanks for the thorough review, this is helpful.
> >>> On Wed, Oct 21, 2026 at 5:51 PM Krishna Chaitanya Chundru
> >>> <krishna.chundru@xxxxxxxxxxxxxxxx> wrote:
> >>>> 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, selected by the
> >>>> Adapter's configuration pins.
> >>>>
> >>>> The connector provides a primary power supply of 3.3V/VBAT, along with
> >>>> optional GPIO signals for WWAN-specific power/radio control:
> >>>> FULL_CARD_POWER_OFF#, RESET#, W_DISABLE1#/2#, WAKE_OQN_WWAN#, and DPR.
> >>>>
> >>>> Signed-off-by: Krishna Chaitanya Chundru <krishna.chundru@xxxxxxxxxxxxxxxx>
> >>>> ---
> >>>> .../bindings/connector/pcie-m2-b-connector.yaml | 146 +++++++++++++++++++++
> >>>> MAINTAINERS | 1 +
> >>>> 2 files changed, 147 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..a7f4bcbc5119
> >>>> --- /dev/null
> >>>> +++ b/Documentation/devicetree/bindings/connector/pcie-m2-b-connector.yaml
> >>>> @@ -0,0 +1,146 @@
> >>>> +# 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@xxxxxxxxxxxxxxxx>
> >>>> +
> >>>> +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.
> >>>> +
> >>>> +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
> >>>> +
> >>>> + w-disable2-gpios:
> >>>> + description: GPIO output to W_DISABLE2# signal (default function of
> >>>> + GPIO_10). This signal is used by the host system to disable a second
> >>>> + radio on the Adapter. Refer, PCI Express M.2 Specification r4.0,
> >>>> + sec 3.1.12.3 for more details.
> >>>> + maxItems: 1
> >>>> +
> >>>> + wowwan-gpios:
> >>>> + description: GPIO input to WAKE_ON_WWAN# (WoWWAN#) signal. The Adapter
> >>>> + asserts this signal to wake up the host system. Refer, PCI Express M.2
> >>>> + Specification r4.0, sec 3.2.13.3.6 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
> >>> This seems to be missing the four CONFIG_* pins, which are quite
> >>> crucial in these connectors, as they define which interfaces the
> >>> module asks the host to provide on the respective pins. Without those
> >>> module type detection is impossible.
> >> Agreed, thanks for catching this. I will add a config-gpios property (4 GPIO
> >> inputs, one per CONFIG_0..3 pin) to v2. It's optional, not required - a board
> >> that always has a known, fixed card type in a given socket (e.g. QCOM
> >> glymur-crd's WWAN-only slot) can just describe that fixed wiring via the ports
> >> property and skip CONFIG decode entirely; config-gpios is only needed when the
> >> host wants to detect the card type/host-interface at runtime. Kept it as plain
> >> sensed GPIOs with no decode semantics imposed by the schema - the property
> >> description documents the full Table 3-18 state table inline (all 16 states)
> >> so the binding is self-contained, but turning the sensed 4-bit pattern into
> >> "this is a WWAN-PCIe Adapter in port config 0" is left to driver code,
> >> consistent with how the rest of the connector's sensed straps (e.g.
> >> viocfg-gpios on the E-connector) are already handled.
> > Agreed that the logic of turning the 4-bit pattern into
> > enabling/disabling interfaces sounds like a driver realm, although we
> > probably need to consider if the connector should accept pinctrl-0
> > through pinctrl-15 to hint the host about which pin muxes should
> > follow from each of the 16 4-bit CONFIG_* pin states. This mapping is
> > hard to recover outside the connector's context.
> I'd put the pinctrl states on the connector, one per CONFIG_0..3 value (Table
> 3-18), selected after the driver reads config-gpios. The CONFIG-to-mux mapping
> can't be recovered from the interface providers, as you said. Providers would
> keep only their own default pinctrl. What I'm unsure about is how much is
> SoC-muxed in practice. The high-speed pairs are often fixed by PHY or lane
> routing, so the states may mostly matter for GPIO_0..11. Do you know of a case
> where they cover more than that?

Thanks, that makes sense.

Regarding the high-speed pairs, the Rockchip based boards that I know
about route one PCIe lane muxed with SATA to the connector, with the
SoC combo-PHY managing the interface muxing (including the polarity
swap for the SATA-B pair). I don't know how people deal with the
second PCIe lane vs. USB SS muxing though, or if such devices have
been made available at all. Either way, it sounds like those could be
modeled as one port per muxed pin group - i.e., port@0 for SATA+PCIe
lane 0 (as two endpoints), port@1 for PCIe lane 1+USB SS+SSIC (as
three endpoints), etc. A PHY driver for a dual-lane PCIe interface
would then have to figure out whether its OF graph has one or two
links and configure the PHY and the controller accordingly.

Best regards,
Alexey