[PATCH] power: sequencing: pcie-m2: Drive the Key E SDIO_RESET# signal
From: William Bright
Date: Mon Oct 26 2026 - 07:40:23 EST
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.
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);
}
static int pwrseq_pcie_m2_vregs_disable(struct pwrseq_device *pwrseq)
{
struct pwrseq_pcie_m2_ctx *ctx = pwrseq_device_get_drvdata(pwrseq);
+ int ret;
+
+ ret = gpiod_set_value_cansleep(ctx->sdio_reset_gpio, 1);
+ if (ret)
+ return ret;
return regulator_bulk_disable(ctx->num_vregs, ctx->regs);
}
@@ -562,6 +573,13 @@ static int pwrseq_pcie_m2_probe(struct platform_device *pdev)
goto err_free_regulators;
}
+ ctx->sdio_reset_gpio = devm_gpiod_get_optional(dev, "sdio-reset", GPIOD_OUT_HIGH);
+ if (IS_ERR(ctx->sdio_reset_gpio)) {
+ ret = dev_err_probe(dev, PTR_ERR(ctx->sdio_reset_gpio),
+ "Failed to get the SDIO_RESET# GPIO\n");
+ goto err_free_regulators;
+ }
+
config.parent = dev;
config.owner = THIS_MODULE;
config.drvdata = ctx;
---
base-commit: 1a0586064ee1fbcefe49b6382ee17a236c590879
change-id: 20261026-pwrseq-pcie-m2-sdio-reset-015492a846ad
Best regards,
--
William Bright <william.bright@xxxxxxxxxxx>