Re: [PATCH] power: sequencing: pcie-m2: Drive the Key E SDIO_RESET# signal

From: Manivannan Sadhasivam

Date: Mon Oct 26 2026 - 08:51:48 EST


On Mon, Oct 26, 2026 at 11:38:38AM +0000, William Bright wrote:
> The pcie-m2-e-connector binding describes sdio-reset-gpios, but the
> driver never requested it, so the line was left to pinctrl or to its
> reset state.

Do we have SDIO pwrseq consumer driver in mainline?

>
> Request it asserted, like W_DISABLE1# and W_DISABLE2#, deassert it once
> the connector supplies are enabled and assert it again before they are
> disabled. The card is then held in reset through power-up, and the
> line is never driven high into an unpowered card.
>
> Signed-off-by: William Bright <william.bright@xxxxxxxxxxx>
> ---
> The pcie-m2-e-connector binding describes sdio-reset-gpios, but the
> driver never requested it. This holds the card in SDIO reset until the
> connector supplies are enabled, and asserts it again before they are
> disabled, matching how W_DISABLE1# and W_DISABLE2# are handled.
> ---
> drivers/power/sequencing/pwrseq-pcie-m2.c | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/power/sequencing/pwrseq-pcie-m2.c b/drivers/power/sequencing/pwrseq-pcie-m2.c
> index cafa642a4b6b..5f5a116063da 100644
> --- a/drivers/power/sequencing/pwrseq-pcie-m2.c
> +++ b/drivers/power/sequencing/pwrseq-pcie-m2.c
> @@ -39,6 +39,7 @@ struct pwrseq_pcie_m2_ctx {
> struct notifier_block nb;
> struct gpio_desc *w_disable1_gpio;
> struct gpio_desc *w_disable2_gpio;
> + struct gpio_desc *sdio_reset_gpio;
> struct device *dev;
> struct list_head pci_devices;
> struct mutex list_lock;
> @@ -47,13 +48,23 @@ struct pwrseq_pcie_m2_ctx {
> static int pwrseq_pcie_m2_vregs_enable(struct pwrseq_device *pwrseq)
> {
> struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
> + int ret;
> +
> + ret = regulator_bulk_enable(ctx->num_vregs, ctx->regs);
> + if (ret)
> + return ret;
>
> - return regulator_bulk_enable(ctx->num_vregs, ctx->regs);
> + return gpiod_set_value_cansleep(ctx->sdio_reset_gpio, 0);

You should not add GPIO control to the pwrseq_pcie_m2_vregs_{enable/disable}()
callbacks. You should create a new 'sdio-enable' and populate
pwrseq_unit_data->enable/disable callbacks for the SDIO_RESET# control.

Please take a look at the 'pcie-enable' unit and W_DISABLE1/2# GPIO control.

But before that, you should explain how the SDIO consumer driver is making use
of pwrseq.

- Mani

--
மணிவண்ணன் சதாசிவம்