public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Herve Codina <herve.codina@bootlin.com>
To: Chen-Yu Tsai <wenst@chromium.org>
Cc: "Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@oss.qualcomm.com>,
	"Rob Herring" <robh@kernel.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nicolas.schier@linux.dev>,
	"Hans de Goede" <hansg@kernel.org>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Mark Pearson" <mpearson-lenovo@squebb.ca>,
	"Derek J. Clark" <derekjohn.clark@gmail.com>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Marcel Holtmann" <marcel@holtmann.org>,
	"Luiz Augusto von Dentz" <luiz.dentz@gmail.com>,
	"Bartosz Golaszewski" <brgl@bgdev.pl>,
	"Bartosz Golaszewski" <brgl@kernel.org>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	platform-driver-x86@vger.kernel.org, linux-pci@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-bluetooth@vger.kernel.org, linux-pm@vger.kernel.org,
	"Stephan Gerhold" <stephan.gerhold@linaro.org>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	linux-acpi@vger.kernel.org,
	"Hans de Goede" <johannes.goede@oss.qualcomm.com>,
	"Bartosz Golaszewski" <bartosz.golaszewski@oss.qualcomm.com>,
	"Luca Ceresoli" <luca.ceresoli@bootlin.com>
Subject: Re: [PATCH v7 0/8] Add support for handling PCIe M.2 Key E connectors in devicetree
Date: Wed, 15 Apr 2026 16:56:51 +0200	[thread overview]
Message-ID: <20260415165651.153b573d@bootlin.com> (raw)
In-Reply-To: <CAGXv+5EPA29G-fsH=wWOD8AK6TZFezFhsE0NHPYj_Pt3nT+d_w@mail.gmail.com>

Hi Chen, all,

...
 
> 
> I'm not arguing for a even more generic "M.2" connector. The "key" is
> already described in the compatible. I'm saying we should have some way
> of describing the individual interfaces (PCIe, SDIO, USB, UART, I2S, I2C)
> on the connector so further nodes or properties can be attached to them,
> either with overlays or dynamically within the kernel. Right now the
> are only described as individual ports, but we can't actually tie a
> device to a OF graph port.
> 
> But maybe I'm overthinking the representation part. AFAICT for Qualcomm's
> UART-based BT bit part, Mani just had the driver create a device node
> under the UART (by traversing the OF graph to find the UART). If that's
> the desired way then the connector binding should mention it. And that
> works for me. But I think it's messier and also we're missing an
> opportunity to make the M.2 connector a standardized attachment point
> for overlays.
> 
> Mani, could you also chime in a bit on what you envisioned?
> 
> (Added Luca from Bootlin to CC, as I think there are parallels to the
>  "Hotplug of Non-discoverable Hardware" work)
>

Related to "Hotplug of Non-discoverable Hardware",

I would add entries for busses in the connector without using an OF graph.

For I2C and later SPI, this was is done.

You already have an i2c-parent property but no node where an i2c device
can be added.

The last discussion related to hotplug, connectors and DT led to the RFC
series [1].

It is a huge series. The last patch give a real example of representation:
  https://lore.kernel.org/all/20260112142009.1006236-78-herve.codina@bootlin.com/

In your case I would see some thing like:

    connector {
        compatible = "pcie-m2-e-connector";
        vpcie3v3-supply = <&vreg_wcn_3p3>;
        vpcie1v8-supply = <&vreg_l15b_1p8>;

	/*
	 * If those GPIOs have to be used by components available in
	 * the connected board, a Nexus node should be used.
         */
        w-disable1-gpios = <&tlmm 115 GPIO_ACTIVE_LOW>;
        w-disable2-gpios = <&tlmm 116 GPIO_ACTIVE_LOW>;
        viocfg-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>;
        uart-wake-gpios = <&tlmm 118 GPIO_ACTIVE_LOW>;
        sdio-wake-gpios = <&tlmm 119 GPIO_ACTIVE_LOW>;
        sdio-reset-gpios = <&tlmm 120 GPIO_ACTIVE_LOW>;

	conn-i2c {
		i2c-parent = <&i2c0>;

		/*
 		 * Here i2c devices available on the board
		 * connected to the connector can be described.
		 */
	};

	/* Same kind to description for other busses */
	conn-pcie {
		pci-parent = <&xxxxx>;

		/*
		 * The PCIe bus has abilities to discover devices.
		 * Not sure this node is needed.
		 *
		 * If a PCI device need a DT description to describe
		 * stuffs behind the device, what has been done for LAN966x
		 * could be re-used [2] and [3]
		 */
	};

	conn_uart {
		uart-parent = <&uart-ctrl>;

		/* uart child (maybe a serdes) should be describe here
	};

	...
    };

Of course, some DT symbols need to be exported in order to have them usable from
the DT describing the connected board.

This notion of exported symbol is not yet available upstream and is the purpose of
the RFC series [1].

[1] https://lore.kernel.org/all/20260112142009.1006236-1-herve.codina@bootlin.com/
[2] https://elixir.bootlin.com/linux/v7.0/source/drivers/misc/lan966x_pci.c
[3] https://elixir.bootlin.com/linux/v7.0/source/drivers/misc/lan966x_pci.dtso

Feel free to ask for more specific question if needed.

Best regards,
Hervé

> 
> Thanks
> ChenYu
> 
> 
> > > The latter part is solvable, but we likely need child nodes under the
> > > connector for the different interfaces. Properties that make sense for
> > > one type might not make sense for another.
> > >
> > > P.S. We could also just add child device nodes under the controller to
> > > put the generic properties, but that's splitting the description into
> > > multiple parts. Let's not go there if at all possible.  
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
> >
> >  



-- 
Hervé Codina, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

      parent reply	other threads:[~2026-04-15 14:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26  8:06 [PATCH v7 0/8] Add support for handling PCIe M.2 Key E connectors in devicetree Manivannan Sadhasivam via B4 Relay
2026-03-26  8:06 ` [PATCH v7 1/8] serdev: Convert to_serdev_*() helpers to macros and use container_of_const() Manivannan Sadhasivam via B4 Relay
2026-03-30 19:28   ` Rob Herring
2026-03-26  8:06 ` [PATCH v7 2/8] serdev: Add an API to find the serdev controller associated with the devicetree node Manivannan Sadhasivam via B4 Relay
2026-03-30 19:28   ` Rob Herring
2026-03-26  8:06 ` [PATCH v7 3/8] serdev: Do not return -ENODEV from of_serdev_register_devices() if external connector is used Manivannan Sadhasivam via B4 Relay
2026-03-30 19:29   ` Rob Herring
2026-03-26  8:06 ` [PATCH v7 4/8] dt-bindings: serial: Document the graph port Manivannan Sadhasivam via B4 Relay
2026-03-26  8:06 ` [PATCH v7 5/8] dt-bindings: connector: Add PCIe M.2 Mechanical Key E connector Manivannan Sadhasivam via B4 Relay
2026-03-26  8:48   ` Bartosz Golaszewski
2026-03-26  8:06 ` [PATCH v7 6/8] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Manivannan Sadhasivam via B4 Relay
2026-03-26  8:06 ` [PATCH v7 7/8] power: sequencing: pcie-m2: Add support for PCIe M.2 Key E connectors Manivannan Sadhasivam via B4 Relay
2026-03-26  8:06 ` [PATCH v7 8/8] power: sequencing: pcie-m2: Create serdev device for WCN7850 bluetooth Manivannan Sadhasivam via B4 Relay
2026-03-26  8:54 ` [PATCH v7 0/8] Add support for handling PCIe M.2 Key E connectors in devicetree Bartosz Golaszewski
2026-03-31  7:55 ` (subset) " Bartosz Golaszewski
2026-04-13  7:54 ` Chen-Yu Tsai
2026-04-13 14:02   ` Manivannan Sadhasivam
2026-04-13 16:08     ` Manivannan Sadhasivam
2026-04-14  5:03       ` Chen-Yu Tsai
2026-04-14  8:28         ` Andy Shevchenko
2026-04-14 10:29           ` Chen-Yu Tsai
2026-04-14 12:03             ` Andy Shevchenko
2026-04-15  8:31               ` Chen-Yu Tsai
2026-04-15  9:07                 ` Andy Shevchenko
2026-04-15 14:56                 ` Herve Codina [this message]

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=20260415165651.153b573d@bootlin.com \
    --to=herve.codina@bootlin.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=bartosz.golaszewski@oss.qualcomm.com \
    --cc=brgl@bgdev.pl \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=derekjohn.clark@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=johannes.goede@oss.qualcomm.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=luiz.dentz@gmail.com \
    --cc=mani@kernel.org \
    --cc=manivannan.sadhasivam@oss.qualcomm.com \
    --cc=marcel@holtmann.org \
    --cc=mpearson-lenovo@squebb.ca \
    --cc=nathan@kernel.org \
    --cc=nicolas.schier@linux.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=stephan.gerhold@linaro.org \
    --cc=wenst@chromium.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