mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <mani@kernel.org>
To: William Bright <william.bright@imd-tec.com>
Cc: Bartosz Golaszewski <brgl@kernel.org>,
	linux-pci@vger.kernel.org,  linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] power: sequencing: pcie-m2: Drive the Key E SDIO_RESET# signal
Date: Mon, 26 Oct 2026 18:16:38 +0530	[thread overview]
Message-ID: <at9KREB4Fyf-Jl5S@debian> (raw)
In-Reply-To: <20261026-pwrseq-pcie-m2-sdio-reset-v1-1-02ecdafce518@imd-tec.com>

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@imd-tec.com>
> ---
> 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

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

  reply	other threads:[~2026-10-26 12:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 11:38 William Bright
2026-10-26 12:46 ` Manivannan Sadhasivam [this message]
2026-10-26 13:56   ` William Bright
2026-10-27 11:59     ` Manivannan Sadhasivam

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=at9KREB4Fyf-Jl5S@debian \
    --to=mani@kernel.org \
    --cc=brgl@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=william.bright@imd-tec.com \
    /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

all inboxes | Powered by JetHome®